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