John starts working on a project at 9:00 AM and finishes it at 5:30 PM. He takes two breaks, one for 45 minutes and another for 30 minutes. How many hours did John spend working on the project? Let's think step by step and output the final answer within \boxed{}.
user