l = int(input()) m = int(input()) n = int(input()) #l;100, m:25, n:1 a = n*1//25 print("25円硬貨に変える枚数={}".format(a)) x = n*1%25 print("1円硬貨の枚数={}".format(x)) m = m+a b = m*25//100 print("100円硬貨に変える枚数={}".format(b)) y = (m*25%100)//25 print("25円硬貨の枚数={}".format(y)) l = l+b c = l*100//1000 print("1000円硬貨の枚数={}".format(c)) z = (l*100%1000)//100 print("100円硬貨の枚数={}".format(z)) print(x+y+z)