Misha has accepted a job in the mines and will produce one ore each day. At the market, he can perform the following transactions:
- Buy or sell one ore for $3.
- Buy or sell bundles of three wheat for $12 each.
- Sell one wheat for one ore.

His ultimate goal is to build a city, which requires:
- Three ore
- Two wheat

How many dollars must Misha begin with in order to build a city after three days of working?

Let's think step by step and output the final answer within \boxed{}.
user