Binomial Theorem

#1
I'm trying to do this following below in R:


The Harriet Hotel in downtown Boston has 100 rooms that rent for $150 per night. It costs the hotel $30 per room in variable costs (cleaning, bathroom items, etc.) each night a room is occupied. For each reservation accepted, there is a 5% chance that the guest will not arrive. If the hotel overbooks, it costs $200 to compensate guests whose reservations cannot be honored. How many reservations should the hotel accept if it wants to maximize the average daily profit?