A bookstore has a promotion where customers receive a discount based on their total purchase amount. If a customer spends $50 or more, they receive a $10 discount. If they spend less than $50, they receive a $5 discount. Sarah went to the bookstore and bought three books for $15 each. How much did she pay after applying the discount?