Sean had puffs and Brandon had cookies. Both gave half of what they had to each other. Sean sold 12 puffs and Brandon sold 36 cookies. In the end, the ratios of puffs to cookies for Sean and Brandon were 1 : 6 and 1 : 4 respectively. How many puffs did Sean have at first?