import sys L,M,N = map(int, sys.stdin.read().split()) n = L*100 + M*25 + N n1000, n = divmod(n, 1000) n100, n = divmod(n, 100) n25, n1 = divmod(n, 25) print(n100+n25+n1)