l = int(input()) m = int(input()) n = int(input()) total = l + (m * 25) + (n * 100) over = total % 1000 (l, over) = divmod(over, 100) (m, n) = divmod(over, 25) print(l + m + n)