Xavier had macarons and Henry had tarts. Both gave half of what they had to each other. Xavier sold 12 macarons and Henry sold 24 tarts. In the end, the ratios of macarons to tarts for Xavier and Henry were 1 : 8 and 1 : 6 respectively. How many macarons did Xavier have at first?