Luis had wafers and Fred had croissants. Both gave half of what they had to each other. Luis sold 10 wafers and Fred sold 20 croissants. In the end, the ratios of wafers to croissants for Luis and Fred were 1 : 5 and 1 : 3 respectively. How many wafers did Luis have at first?