# Arup Guha
# 9/29/2020
# Allowances and Video Games

GAMECOST = 50

n = int(input("How many video games do you want?\n"))

# Keep track of week number.
week = 1

# And current money...
money = 0

# Loop through each game.
for games in range(n):

    # Keep on going until we get 50 bucks!
    while money < GAMECOST:

        # Get the allowance for this week.
        curAllow = int(input("How much was your allowance for week "+str(week)+"?\n"))

        # Now we go to the next week.
        week = week + 1

        # Update my money!
        money = money + curAllow


    # Woohoo, we can buy a game!
    print("We can buy a game now!")
    print("We have",games+1,"number of games.")

    # Update our cash accordingly.
    money = money - GAMECOST
    print("Now we have",money,"left after buying the game.")
