L,M,N=[int(input()) for _ in range(3)] L*=100;M*=25 A=L+M+N;ans=0 A%=1000 ans+=A//100 A%=100 ans+=A//25 print(ans+A)