#include using namespace std; #define REP(i,a,b) for(i=a;i'9')break;*x=(*x)*10+k-'0';}if(m)(*x)=-(*x);} void reader(int *x, int *y, int *z){reader(x);reader(y);reader(z);} void writer(int x, char c){int s=0,m=0;char f[10];if(x<0)m=1,x=-x;while(x)f[s++]=x%10,x/=10;if(!s)f[s++]=0;if(m)mypc('-');while(s--)mypc(f[s]+'0');mypc(c);} int A, B, C, X; int main(){ reader(&A,&B,&C); X = A*100 + B*25 + C; X %= 1000; writer(X/100 + (X%100)/25 + (X%25),'\n'); return 0; }