Jennifer is planning a trip. The hotel costs $50 per night and her flights cost $150. She has a budget of $500 for the hotel and her flights. How many nights can she afford in the hotel, while staying within her budget?