N = int(input()) M = int(input()) L = int(input()) S = L+25*M+100*N H = S%1000//100 Q = S%1000%100//25 O = S%1000%100%25 i = H+Q+O print(i)