money = 0 money += int(input())*100 money += int(input())*25 money += int(input()) print(money) if money>=1000: money -= money//1000*1000 print(money) coin = money//100 coin += money%100//25 coin += money%100%25 print(coin)