You are trapped in a room with only one exit, a long hallway with a series of doors and land mines. To get out, you must open all the doors and disarm all the mines. In the room, there is a panel with $3$ buttons, which conveniently contains an instruction manual:

- The red button arms a mine.
- The yellow button disarms two mines and closes a door.
- The green button opens two doors.

Initially, $3$ doors are closed, and $3$ mines are armed. The manual warns that attempting to disarm two mines or open two doors when only one is armed/closed will reset the system to its initial state. What is the minimum number of buttons you must push to get out?

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