the math is
 
Winter Hats