Emily is baking cookies for a school event. She needs to make a certain number of cookies over four days. On the first day, she bakes half the total number of cookies she plans to make. On the second day, she bakes another 12 cookies. On the third day, she bakes 18 more cookies. By the end of the fourth day, Emily has baked a total of 64 cookies. How many cookies did Emily bake on the first day? Let's think step by step and output the final answer within \boxed{}.
user