Nick had biscuits and Daniel had shortbreads. Both gave half of what they had to each other. Nick sold 13 biscuits and Daniel sold 24 shortbreads. In the end, the ratios of biscuits to shortbreads for Nick and Daniel were 1 : 8 and 1 : 6 respectively. How many biscuits did Nick have at first?