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