A bookstore received a shipment of 500 books on Monday. By Wednesday, they sold 150 books. On Thursday, 50 books were found to be damaged and were returned. On Friday, they received another shipment, three times the size of the first one. How many books did the bookstore have available for sale on Saturday? Let's think step by step and output the final answer within \boxed{}.
user