Mario wants to give out an equal number of blue shells to each friend. If he gives 10 blue shells to each friend, he will be short of 30 blue shells. If he gives 8 blue shells to each friend, he will be short of 6 blue shells. How many friends did he have?