s=[int(input()) for i in range(3)] s1=s[0]*100+s[1]*25+s[2]*1 t1=s1//100 n1=s1%100 t2=n1//25 n2=t2%25 total=t1+t2+n2 print(total)