#include int main(void){ int L,M,N; scanf("%d%d%d",&L,&M,&N); int t=100*L+25*M+N; printf("%d\n",(t/1000)+((t%1000)/100)+((t%100)/25)+t%25); return 0; }