
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Mary wants to buy one large pizza, two medium pizzas, and five drinks. The drinks cost $p$ dollars each, each medium pizza costs two times as much as one drink, and the large pizza costs three times as much as one drink. If Mary started with $50$ dollars, how much money would she have left after making all of her purchases? Give your answer as an expression of $p$.

Present the answer in LaTex format: \boxed{Your answer}
user