Sean had muffins and Will had shortbreads. Both gave half of what they had to each other. Sean sold 9 muffins and Will sold 22 shortbreads. In the end, the ratios of muffins to shortbreads for Sean and Will were 1 : 6 and 1 : 4 respectively. How many muffins did Sean have at first?