def solve(): l=int(input()) m=int(input()) n=int(input()) s=l*100+m*25 s//=1000 ans=0 ans+=s//100 s//=100 ans+=m//25 s//=25 ans+=s print(ans) if __name__=="__main__": solve()