L = int(input()) M = int(input()) N = int(input()) S = L * 100 + M * 25 + N ans = S % 25 S //= 25 ans += S % 4 S //= 4 ans += S % 10 print(ans)