Given the task definition and input, reply with output. You are given a math word problem and you are supposed to only use subtraction on the numbers embedded in the text to answer the following question and then only report the final numerical answer.

Context: Lucy went to the grocery store. She bought 23 packs of cookie and some packs of cake. In total she had 27 packs of grocery

Question: How many packs of cake did she buy in all?
4