A restaurant has 40 tables with 4 legs and 50 tables with 3 legs. Calculate the total number of legs the restaurant's tables have.
Please reason step by step, and put your final answer within \boxed{}.
user