L = input() M = input() N = input() sum = L * 100 + M * 25 + N q, r = divmod(sum, 1000) q, r = divmod(r, 100) ans = q q, r = divmod(r, 25) ans += q ans += r print ans