#include int main(){ int l,n,m;scanf("%d%d%d",&l,&n,&m); int ans=0; int a=(l*100+n*25+m*1)%1000; l=a/100; a%=100; m=a/25; a%=25; n=a; printf("%d\n",l+m+n); return 0; }