a,b,c = map(int, input().split()) #a = 1yen #b = 25yen #c = 100yen qa, amod = divmod(a, 25) b = b + qa qb, bmod = divmod(b, 4) c = c + qb qc, cmod = divmod(c, 10) print(amod + bmod + cmod)