#include
int main()
{
int a[6]={100,50,10,5,2,1};
int b[6],c[100];
int n,i,j,sum;
while(~scanf("%d",&n))
{
sum = 0; //每个测试用例都要给sum重新赋值为0。否则每测一次,sum就累加。
if(n==0)break;
for(i=0;i
for(i=0;i
{
b[j]=c[i]/a[j];
c[i]=c[i]%a[j];
sum=sum+b[j];
}
printf("%d\n",sum);
}
return 0;
}