import math l = int(input()) m = int(input()) n = int(input()) cnt = 0 sum = l * 100 + m * 25 + n * 1 if sum >= 100: cnt = int(str(sum)[-3]) sum = int(str(sum)[-2:]) print(cnt + math.floor(sum/25) + sum%25)