def get_evening_cars(morning_cars,requested,returned,max_cars):
    """ 
    compute #cars avaiable in the evening, given #cars in the morning, 
    #returned and #requests during the day
    """
    return min(max(morning_cars - requested,0) + returned, max_cars)