L = int(input())//100 M = int(input())//25 N = int(input()) M += N//25 n = N%25 L += M//4 l = M%4 K = L//10 k = L%10 print(k+l+m+n)