Marta bought five textbooks on sale, for a total of 5 * 10 = $<<5*10=50>>50.

Three textbooks from the bookstore had a cost of 3 * 40 = $<<3*40=120>>120.

That means that Marta spent in total 50 + 40 + 120 = $<<50+40+120=210>>210 on textbooks.

# Answer

210
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Marta was about to start the school year and needed to buy the necessary textbooks. She managed to buy five on sale, for $10 each. She had to order two textbooks online, which cost her a total of $40, and three she bought directly from the bookstore for a total of three times the cost of the online ordered books. How much in total did Martha spend on textbooks?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
210
Marta was about to start the school year and needed to buy the necessary textbooks. She managed to buy five on sale, for $10 each. She had to order two textbooks online, which cost her a total of $40, and three she bought directly from the bookstore for a total of three times the cost of the online ordered books. How much in total did Martha spend on textbooks?
train