Eric had biscuits and Bryan had shortbreads. Both gave half of what they had to each other. Eric sold 10 biscuits and Bryan sold 40 shortbreads. In the end, the ratios of biscuits to shortbreads for Eric and Bryan were 1 : 4 and 1 : 2 respectively. How many biscuits did Eric have at first?