The amount of money earned varies directly with the number of hours worked. If Jack earned $313.25 for 35 hours, then how many hours did he work when he earned $366.95?