L = int(input()) M = int(input()) N = int(input()) amount = 100 * L + 25 * M + N a = (amount % 1000) // 100 b = (amount % 100) // 25 c = amount % 25 print(a + b + c)