Ken had biscuits and Ivan had tarts. Both gave half of what they had to each other. Ken sold 13 biscuits and Ivan sold 35 tarts. In the end, the ratios of biscuits to tarts for Ken and Ivan were 1 : 5 and 1 : 3 respectively. How many biscuits did Ken have at first?