int main(){
	char a[81];
	char b[81];
	gets (a);
	gets (b);
	int i;
	for(i=0;i<81;i++){
		switch(a[i]){
		case 'A':a[i]='a';break;
		case 'B':a[i]='b';break;
		case 'C':a[i]='c';break;
		case 'D':a[i]='d';break;
		case 'E':a[i]='e';break;
		case 'F':a[i]='f';break;
		case 'G':a[i]='g';break;
		case 'H':a[i]='h';break;
		case 'I':a[i]='i';break;
		case 'J':a[i]='j';break;
		case 'K':a[i]='k';break;
		case 'L':a[i]='l';break;
		case 'M':a[i]='m';break;
		case 'N':a[i]='n';break;
		case 'O':a[i]='o';break;
		case 'P':a[i]='p';break;
		case 'Q':a[i]='q';break;
		case 'R':a[i]='r';break;
		case 'S':a[i]='s';break;
		case 'T':a[i]='t';break;
		case 'U':a[i]='u';break;
		case 'V':a[i]='v';break;
		case 'W':a[i]='w';break;
		case 'X':a[i]='x';break;
		case 'Y':a[i]='y';break;
		case 'Z':a[i]='z';break;
}

switch(b[i]){
		case 'A':b[i]='a';break;
		case 'B':b[i]='b';break;
		case 'C':b[i]='c';break;
		case 'D':b[i]='d';break;
		case 'E':b[i]='e';break;
		case 'F':b[i]='f';break;
		case 'G':b[i]='g';break;
		case 'H':b[i]='h';break;
		case 'I':b[i]='i';break;
		case 'J':b[i]='j';break;
		case 'K':b[i]='k';break;
		case 'L':b[i]='l';break;
		case 'M':b[i]='m';break;
		case 'N':b[i]='n';break;
		case 'O':b[i]='o';break;
		case 'P':b[i]='p';break;
		case 'Q':b[i]='q';break;
		case 'R':b[i]='r';break;
		case 'S':b[i]='s';break;
		case 'T':b[i]='t';break;
		case 'U':b[i]='u';break;
		case 'V':b[i]='v';break;
		case 'W':b[i]='w';break;
		case 'X':b[i]='x';break;
		case 'Y':b[i]='y';break;
		case 'Z':b[i]='z';break;
}
	}

	if(strcmp(a,b)<0)printf("<");
	if(strcmp(a,b)==0)printf("=");

	if(strcmp(a,b)>0)printf(">");
		return 0;
}


int main()
{
    int i=0,sum=0;
    char str1[80],str2[80];
    int len1=0,len2=0;
    cin.getline(str1,80);

    cin.getline(str2,80);
    for(len1=0;str1[len1]!='\0';len1++);
    for(len2=0;str2[len2]!='\0';len2++);

    for(i=0;i<len1;i++)
    {
                       if(str1[i]>=97)
                       str1[i]=str1[i]-32;
                       if(str2[i]>=97)
                       str2[i]=str2[i]-32;

                        if(str1[i]>str2[i])
                       {cout <<   ">" << endl;
                       sum=1;
                       break;
                       }
                       else if(str1[i]<str2[i])
                       {
                           cout << "<" << endl;
                           sum=1;
                           break;
                       }
                       else if(str1[i]==str2[i])
                       continue;
    }

    if(len1<len2)
    {cout << "<" << endl;
    sum=1;
    }
    if(sum!=1)
    cout << "=" << endl;

return 0;
}


int max(int,int);
int main()
{
	int i,n,len1,len2;
	char str1[100],str2[100];
	cin.getline(str1,1000);
	cin.getline(str2,1000);
    len1 = strlen(str1);
	len2 = strlen(str2);
    n = max(len1,len2);
	for(i = 0; i < n; i++)
	{
		if(str1[i] >= 'a')
			str1[i] -= 32;
		if(str2[i] >= 'a')
			str2[i] -= 32;
		if((str1[i] != str2[i])&&(fabs(str1[i] - str2[i]) != 32))
		{
			if(str1[i] > str2[i])
			{
				cout << ">";
				break;
			}
			if(str1[i] < str2[i])
			{
				cout << "<" ;
				break;
			}
		}
	}
	if(i == n)
		cout << "=";
	return 0;
}
int max(int a,int b)
{
	if(a >= b)
		return a;
	if(a < b)
		return b;
}


/*
 * 111028_03.cpp
 *
 *  Created on: 2011-10-28
 *      Author: Alfalfa
 */
int main ()
{
	char a[81],b[81];
	int i,lenA,lenB;
	cin.getline((a),81);
	cin.getline((b),81);
	lenA=strlen(a);
	lenB=strlen(b);
	for(i=0;i<lenA;i++)
		if(a[i]<97) a[i]=a[i]+32; //?????
	for(i=0;i<lenB;i++)
		if(b[i]<97) b[i]=b[i]+32;
	if(strcmp(a,b)==1) cout<<">";
		else if(strcmp(a,b)==-1) cout<<"<";
		else cout<<"=";
	return 0;

}


main()
{
	char a[80],b[80];
	int i,n;
	gets(a);
	gets(b);
	n=strlen(a);
	for (i=0;i<n;i++)
	{
		if (a[i]>64&&a[i]<91) a[i]+=32;
		if (b[i]>64&&b[i]<91) b[i]+=32;
	}
	switch (strcmp(a,b))
	{
	case 1:putchar('>');break;
	case 0:putchar('=');break;
	case -1:putchar('<');
	}

}


int main()
{
	char c[80],d[80];
	char f(char x[80]);
	int t;
	gets(c);
	gets(d);
	f(c);
	f(d);
	t=strcmp(c,d);
	if(t<0)
		printf("<");
	if(t==0)
		printf("=");
	if(t>0)
		printf(">");
	 return 0;
}
char f(char x[80])
{
	int m,i;
    m=strlen(x);
    for(i=0;i<=m-1;i++)
	 if(x[i]>='A'&&x[i]<='Z')
			x[i]=x[i]+32;
	 return 0;
}


void f(char a[],int i,int n)
{
  for(i=0;i<n;i++)
  {
    if(a[i]<='Z')
      a[i]=a[i]+'a'-'A';
  }
}
int main()
{
  char a[100],b[100];
  int c,d,i;
  gets(a);
  gets(b);
  c=strlen(a);
  d=strlen(b);
  f(a,i,c);
  f(b,i,d);
  if(strcmp(a,b)==0) printf("=");
  else if(strcmp(a,b)>0) printf(">");
  else printf("<");
  return 0;
}


void main()
{
	char str1[80],str2[80];
	gets(str1);
	gets(str2);
	int i,j;
	for(i=0;i<strlen(str1);i++)
	{
		if(str1[i]>='a' && str1[i]<='z')
			str1[i]=str1[i]-32;
	}
for(j=0;j<strlen(str2);j++)
	{
		if(str2[j]>='a' && str2[j]<='z')
			str2[j]=str2[j]-32;
	}
	if(strcmp(str1,str2)>0)
		printf(">\n");
	if(strcmp(str1,str2)<0)
		printf("<\n");
	if(strcmp(str1,str2)==0)
		printf("=\n");
}


void main()
{
char stq[81],str[81];
int i,j,k;
gets(stq);
gets(str);
for(i=0;stq[i]!='\0';i++)
{if((int)stq[i]<96)
stq[i]=stq[i]+32;}

for(k=0;str[k]!='\0';k++)
{if((int)str[k]<96)
str[k]=str[k]+32;}

if(strcmp(stq,str)>0)
printf(">");
else
if(strcmp(stq,str)==0)
printf("=");
else
if(strcmp(stq,str)<0)
printf("<");
}


char str1[ 81 ], str2[ 81 ];
int main()
{

cin.getline( str1, 100 );
cin.getline( str2, 100);
int i;

if ( strlen( str1 ) > strlen( str2 ) )
{
	cout << ">";
}
else if ( strlen( str1 ) < strlen( str2 ) )
	{
		cout << "<";
	}
	else
	{
		for ( i = 0; i <= strlen( str1 ) - 1; i++ )
		{
			if ( str1[ i ] >= 65 && str1[ i ] <=  90 )
				str1[ i ] = str1[ i ] + 32 ;
			if ( str2[ i ] >= 65 && str2[ i ] <= 90 )
				str2[ i ] = str2[ i ] + 32;
			if ( str1[ i ] > str2[ i ] )
			{
				cout << ">";
				break;
			}
			else
			{
				if ( str1[ i ] < str2[ i ] )
				{
					cout << "<";
					break;
				}
			}
		}
		if ( i == strlen( str1 ) )
			cout << "=";
	}
}


int main()
{
	int i,count1,count2;
	char str1[80],str2[80];
	gets(str1);
	gets(str2);
	count1=strlen(str1);
	count2=strlen(str2);
	for(i=0;i<=count1;i++)
	{
		str1[i]=tolower(str1[i]);
	}
	for(i=0;i<=count2;i++)
	{
		str2[i]=tolower(str2[i]);
	}
	if(strcmp(str1,str2)<0)
		printf("<");
	else if(strcmp(str1,str2)>0)
		printf(">");
	else printf("=");

	return 0;

}


void main()
{
char text1[81],text2[81];int i,j,n;
gets(text1);n=strlen(text1);printf("\n");gets(text2);
for(i=0;i<n;i++)
{if((text1[i]>='a')&&(text1[i]<='z'))   text1[i]=text1[i]-'a'+'A';
if((text2[i]>='a')&&(text2[i]<='z'))   text2[i]=text2[i]-'a'+'A';}
if(strcmp(text1,text2)==0)    printf("=");
else if(strcmp(text1,text2)>0)    printf(">");
else if(strcmp(text1,text2)<0)    printf("<");
}


int main()
{
	char syx[80], zxq[80];
	int i, t1, t2, t;
	gets(syx);
	gets(zxq);
	t1 = strlen(syx);
	t2 = strlen(zxq);
	t = (t1>t2)?t1:t2;
	for(i=0;i<t;i++)
	{
		if (syx[i] < 96)
		{
			syx[i] = syx[i] + 32;
		}
		if (zxq[i] < 96)
		{
			zxq[i] = zxq[i] + 32;
		}
	}
	if (strcmp(syx, zxq) > 0)
		printf(">\n");
	else if (strcmp(syx, zxq) < 0)
		printf("<\n");
	else
		printf("=\n");

	return 0;
}


int main()
{
	char str1[1000],str2[1000];
	int i,j,m,n;
	gets(str1);
	gets(str2);
	for(i=0;i<strlen(str1);i++)
	{
		if(str1[i]>='a'&&str1[i]<='z')
			str1[i]=str1[i]-32;
	}
	for(i=0;i<strlen(str2);i++)
	{
		if(str2[i]>='a'&&str2[i]<='z')
			str2[i]=str2[i]-32;
	}
	if(strcmp(str1,str2)==0)
		printf("=");
	else if(strcmp(str1,str2)>0)
		printf(">");
	else printf("<");
}


int main(int argc, char* argv[])
{   int i,c,d,e,n=0;
    char a[100];
    char b[100];
	gets(a);
    gets(b);
	c=strlen(a);
	for(i=0;i<c;i++){
		if (a[i]<97) a[i]=a[i]+32;}
	d=strlen(b);
    for(i=0;i<d;i++){
		if (b[i]<97) b[i]=b[i]+32;}
	if(c==d){
    for(i=0;i<c;i++){
		if (a[i]>b[i]){printf(">");break;}
        else if (a[i]<b[i]){printf("<");break;}
		else {n=n+1;}
	}
	if(n==c){printf("=");}
	}
	if(c!=d){if(c>d){e=c;} if(c<d){e=d;}
	for(i=0;i<e;i++){
		if (a[i]>b[i]){printf(">");break;}
        else if (a[i]<b[i]){printf("<");break;}
	}
	}
	return 0;
}


void convert(char *);
int main()
{
	char str1[85],str2[85];
	int result;
	gets(str1);
	gets(str2);
	convert(str1);
	convert(str2);
	result=strcmp(str1,str2);
	if(result==0)
		putchar('=');
	else
		if(result>0)
			putchar('>');
		else
			putchar('<');
	return 0;
}
void convert(char *p)
{
	while(*p)
	{
		if(*p>='A'&&*p<='Z')
			*p+=32;
		p++;
	}
}


int main()
{
    char str1[80],str2[80];
    char c;
    int i;
    gets(str1);
    gets(str2);
    for (i=0;i<80;i++)
    {
        if (str1[i]>64&&str1[i]<91)
            str1[i]+=32;
        if (str2[i]>64&&str2[i]<91)
            str2[i]+=32;
    }
    if (strcmp(str1,str2)>0) printf(">");
    else if (strcmp(str1,str2)==0) printf("=");
    else printf("<");

    return 0;
}


int chance(char d[])
{
    int lend, i;
    lend = strlen(d);
    for(i=0;i<lend;i++)
    {
        if(d[i]<123&&d[i]>96)
        {
            d[i]=d[i]-32;
        }
    }
}
int main()
{
    char a[80], b[80];
    int lena, lenb;
    gets(a);
    gets(b);
    chance(a);
    chance(b);
    if(strcmp(a, b)==0)
    cout<<"="<<endl;
    if(strcmp(a, b)>0)
    cout<<">"<<endl;
    if(strcmp(a, b)<0)
    cout<<"<"<<endl;
    return 0;
}


int main()
{
  char s1[80],s2[80],r1[80],r2[80];
  int n,i,c;
    gets(s1);gets(s2);
	int a=strlen(s1),b=strlen(s2);
	if(a>b)c=b;else c=a;
	for(i=0;i<c;i++){
		r1[i]=toupper(s1[i]);
		r2[i]=toupper(s2[i]);}
	    r1[i]=r2[i]='\0';
     n=strcmp(r1,r2);
	  if(n==0)
	  printf("=");
	  else if(n<0)
		  printf("<");
	   else
		  printf(">");
   return 0;
}


void main()
{
	char str1[80],str2[80];
	int len1,len2;
	gets(str1);
	gets(str2);
	len1=strlen(str1);
	len2=strlen(str2);
	void convert(char a[80],int length);
		convert(str1,len1);
	    convert(str2,len2);
	if (strcmp(str1,str2)>0)
		printf(">");
	else if (strcmp(str1,str2)<0)
		printf("<");
	else printf("=");
}

void convert(char a[80],int length)
{
	int i;
	for(i=0;i<length;i++)
	{
		if (a[i]>='A'&&a[i]<='Z')
	a[i]=a[i]+32;
	}
}


int main()
{
	char str1[80],str2[80];
	int a,i,k=0;
	gets(str1);
	gets(str2);
	a=strlen(str1);
	for(i=0;i<a;i++)
	{
		if(str1[i]>='a'&&str1[i]<='z') str1[i]=str1[i]-32;
		if(str2[i]>='a'&&str2[i]<='z') str2[i]=str2[i]-32;
		if(str1[i]==str2[i])
		{
			k++;
			continue;
		}
		else if(str1[i]>str2[i]) printf(">\n");
		else printf("<\n");
		break;
	}
	if(k==a) printf("=\n");
	return 0;
}


int main()
{
 int MyStrCmp(char *pStr1,char *pStr2);
 char a1[81],a2[81];
 int t;
 gets(a1);
 gets(a2);
    t=MyStrCmp(a1,a2);
 if(t==1)printf(">");
 if(t==0)printf("=");
 if(t==-1)printf("<");
 printf("\n");
 return 0;
}

int MyStrCmp(char *pStr1,char *pStr2)
{
 int i;
 int t;
 char b1[81],b2[81];
 for(i=0;pStr1[i]!='\0';i++)
  if(pStr1[i]>='A'&&pStr1[i]<='Z')
  *(pStr1+i)=*(pStr1+i)+32;
 for(i=0;pStr2[i]!='\0';i++)
  if(pStr2[i]>='A'&&pStr2[i]<='Z')
  *(pStr2+i)=*(pStr2+i)+32;
        t=0;
  if(strlen(pStr1)>strlen(pStr2))t=1;
     if(strlen(pStr1)<strlen(pStr2))t=-1;
        if(strlen(pStr1)==strlen(pStr2))
  {
   for(i=0;i<strlen(pStr1);i++)
   {
    if(*(pStr1+i)>*(pStr2+i))
    {
     t=1;
                    break;
    }
    if(*(pStr1+i)<*(pStr2+i))
    {
     t=-1;
     break;
    }
    if(*(pStr1+i)==*(pStr2+i))
     continue;
   }
  }
 return (t);
}


//============================================================================
// Name        : test3.cpp
// Author      : Liang ShiYu
// Version     : 1.0
// Copyright   : copyright reserved
// Description : about string
//============================================================================

int main() {                       //main function
	char a[80];
	char b[80];                    //dim string a and string b for storing the input
	cin.getline(a,80);
	cin.getline(b,80);             //get the input
	int n=strlen(a);               //calculate the length of the string
	for(int i=0;i<n;i++){
		if(a[i]>=97&&a[i]<=122) a[i]-=32;
	}
	n=strlen(b);
	for (int i=0;i<n;i++){
		if(b[i]>=97&&b[i]<=122) b[i]-=32;
	}                                       //edit each string
	int z;
	z=strcmp(a,b);                  //compare the two string
	if (z<0) cout<<"<";
	if (z==0) cout<<"=";
	if(z>0) cout<<">";              //cout correctly
	return 0;
}


char change(char x)
{
	char a;
	switch (x) {
case 'a':a='A';break;
case 'b':a='B';break;
case 'c':a='C';break;
case 'd':a='D';break;
case 'e':a='E';break;
case 'f':a='F';break;
case 'g':a='G';break;
case 'h':a='H';break;
case 'i':a='I';break;
case 'j':a='J';break;
case 'k':a='K';break;
case 'l':a='L';break;
case 'm':a='M';break;
case 'n':a='N';break;
case 'o':a='O';break;
case 'p':a='P';break;
case 'q':a='Q';break;
case 'r':a='R';break;
case 's':a='S';break;
case 't':a='T';break;
case 'u':a='U';break;
case 'v':a='V';break;
case 'w':a='W';break;
case 'x':a='X';break;
case 'y':a='Y';break;
case 'z':a='Z';break;
	}
	return a;
}
int main(int argc, char* argv[])
{
	char c[80],s[80],p[80],q[80];
	gets(c);
	gets(s);
	int i;
	for(i=0;c[i]!='\0';i++) {
		if (c[i]<='z'&&c[i]>='a') {
		p[i]=change(c[i]);
		}
		else
			p[i]=c[i];
	}
	p[i]='\0';
	for(i=0;s[i]!='\0';i++) {
		if (s[i]<='z'&&s[i]>='a') {
		q[i]=change(s[i]);
		}
		else
			q[i]=s[i];
	}
	q[i]='\0';
	if(strcmp(p,q)==0)
		printf("=");
	if(strcmp(p,q)<0)
		printf("<");
	if(strcmp(p,q)>0)
		printf(">");
	return 0;
}


int main()
{
	char a[80],b[80];
	int x,y,c,d,e;
	gets(a);
	gets(b);
	x=strlen(a);
	e=0;
	for(y=0;y<x;y++)
	{
		if(a[y]<96)
		{
			c=a[y]+32;
		}
		else
		{
			c=a[y];
		}
		if(b[y]<96)
		{
			d=b[y]+32;
		}
		else
		{
			d=b[y];
		}
		if(c==d)
		{
			continue;
		}
		else if(c>d)
		{
			e++;
			printf(">\n");
			break;
		}
		else if(c<d)
		{
			e++;
			printf("<\n");
			break;
		}
	}
	if(e==0)
	{
		printf("=\n");
	}
	return 0;
}


int main(){
	char a[40];
	char b[40];
	int k,t;
	gets(a);
	gets(b);
    for(k=0;a[k]!='\0';k++){
		switch(a[k]){
		        case 'A':a[k]='a';break;
		        case 'B':a[k]='b';break;
                case 'C':a[k]='c';break;
		        case 'D':a[k]='d';break;
		        case 'E':a[k]='e';break;
		        case 'F':a[k]='f';break;
                case 'G':a[k]='g';break;
		        case 'H':a[k]='h';break;
                case 'I':a[k]='i';break;
		        case 'J':a[k]='j';break;
		        case 'K':a[k]='k';break;
		        case 'L':a[k]='l';break;
			    case 'M':a[k]='m';break;
		        case 'N':a[k]='n';break;
                case 'O':a[k]='o';break;
		        case 'P':a[k]='p';break;
		        case 'Q':a[k]='q';break;
		        case 'R':a[k]='r';break;
			    case 'S':a[k]='s';break;
		        case 'T':a[k]='t';break;
                case 'U':a[k]='u';break;
		        case 'V':a[k]='v';break;
		        case 'W':a[k]='w';break;
		        case 'X':a[k]='x';break;
 		        case 'Y':a[k]='y';break;
                case 'Z':a[k]='z';break;
		}
	}
    for(t=0;b[t]!='\0';t++){
		switch(b[t]){
                case 'A':b[t]='a';break;
				case 'B':b[t]='b';break;
                case 'C':b[t]='c';break;
		        case 'D':b[t]='d';break;
		        case 'E':b[t]='e';break;
		        case 'F':b[t]='f';break;
                case 'G':b[t]='g';break;
		        case 'H':b[t]='h';break;
                case 'I':b[t]='i';break;
		        case 'J':b[t]='j';break;
		        case 'K':b[t]='k';break;
		        case 'L':a[t]='l';break;
			    case 'M':b[t]='m';break;
		        case 'N':b[t]='n';break;
                case 'O':b[t]='o';break;
		        case 'P':b[t]='p';break;
		        case 'Q':b[t]='q';break;
		        case 'R':b[t]='r';break;
			    case 'S':b[t]='s';break;
		        case 'T':b[t]='t';break;
                case 'U':b[t]='u';break;
		        case 'V':b[t]='v';break;
		        case 'W':b[t]='w';break;
		        case 'X':b[t]='x';break;
 		        case 'Y':b[t]='y';break;
                case 'Z':b[t]='z';break;
		}
	}
	if(strcmp(a,b)<0){
		puts("<");
	}
	else if(strcmp(a,b)==0){
		puts("=");
	}
	else if(strcmp(a,b)>0){
		puts(">");
	}
	return 0;
}


int f(int x)
{
  if(x>=65&&x<=90) x=x+32;
  return(x);
}
void main()
{
  char str1[80],str2[80];
  int i;
  gets(str1);
  gets(str2);
  for(i=0;i<=79;i++)
  {
    str1[i]=f(str1[i]);
    str2[i]=f(str2[i]);
  }
  if(strcmp(str1,str2)>0) printf(">");
  else if(strcmp(str1,str2)<0) printf("<");
  else printf("=");
}


int main()
{
	char one[80],two[80];
	gets(one);
	gets(two);
	int i,a=0;
	for(i=0;one[i]!='\0';i++)
	{	if(one[i]>='A'&&one[i]<='Z') one[i]+=32;
	}
	for(i=0;two[i]!='\0';i++)
	{   if(two[i]>='A'&&two[i]<='Z') two[i]+=32;
     }
	if(strcmp(one,two)>0) printf(">");
	if(strcmp(one,two)==0) printf("=");
	if(strcmp(one,two)<0) printf("<");
    gets(one);
	return 0;
}


int posi(char*data,int k,int pos)
{
    for (int ii=0; ii<k; ii++)
    {
        if(data[pos+k-ii-1]<10){data[pos+k-ii-2]--;data[pos+k-ii-1]+=10;}
    }
    return 1;
}
int convert(char*data)
{
    int k=strlen(data);
    for (int co=0; co<k ; co++)
        data[co]=data[co]-'0'+10;
    return 0;
}
int compare(char*data1,char*data2,int pos)
{
    int j=strlen(data1),k=strlen(data2);
    if (j<k+pos) return 3;
    if(pos>=1)if(data1[pos-1]>10) return 1;
    for(int i=0;i<k;i++)
    {if(data1[i+pos]>data2[i])return 1;if(data1[i+pos]<data2[i])return 0;}
    return 1;
}
int out(char*data1,char*data2,int pos)
{
    int k=strlen(data2);
    for(int i=0;i<k;i++)
        data1[i+pos]-=data2[i]-10;
    posi(data1, k, pos);
    return 0;
}

int main()
{
    int n;
    char data1[450],data2[450]="13",r[450];
    scanf("%s",data1);
    int j,k;
    j=strlen(data1);
    k=strlen(data2);
    convert (data1);convert(data2);
    int kk;int pp=0;
    for ( kk=0; ;kk++ )
    {
        int pd=0;
        if(compare(data1, data2, kk)==3) break;
        for(;;pd++)
        {
            if(compare(data1, data2, kk)==1) out(data1,data2,kk);
            else break;
        }
        r[kk-pp]=pd+10;if(kk==0&&pd==0) pp++;
    }
    r[kk-pp]=0;
    int w=strlen(r);
    for (int rr=0 ;rr< w; rr++)
    {printf("%d",r[rr]-10);}
    if(w==0) printf("0");
    printf("\n");
    w=strlen(data1);int qq=1;
    for (int rr=0 ;rr< w; rr++)
    {if(qq)if(data1[rr]!=10){printf("%d",data1[rr]-10);qq=0;}else ;else printf("%d",data1[rr]-10);}
    if(qq) printf("0");
    if(w==0) printf("0");

}


const int maxn=100;
int a[maxn+10];
char line[maxn+10];
int main()
{
    int i,j=0;
    scanf("%s",line);
    int len=strlen(line);
    int a[maxn+10]={0},b;
    int temp=0;

    for(i=0;i<len;i++)
    {
        temp=temp*10+line[i]-'0';
        a[i]=temp/13;
        temp=temp%13;
    }
    int m=0;
    if(len==1)printf("0");
    if((len<=2)&&(((line[0]-'0')*10+(line[1]-'0'))<13))printf("0");
    for(i=0;i<len;i++)
    {
        if(a[i]!=0){m=1;}
        if(m==1)printf("%d",a[i]);

    }
    printf("\n%d",temp);
    return 0;
}


int main() {
	char str[105];
	cin >> str;
	int len = strlen( str ), num = 0, shang[105], j = 0, sign = 0, flag = 0;
	for ( int i = 0; str[i] != '\0'; i ++ ) {
		num += str[i] - '0';
		if ( num >= 13 ) {
			flag = 1;
			shang[j ++] = num / 13;
			if ( str[i + 1] != '\0' ) num = ( num % 13 ) * 10;
			else num = num % 13;
		}
		else if ( str[i + 1] != '\0' ) {
			num *= 10;
			shang[j ++] = 0;
		}
		else shang[j ++] = 0;
	}
	if ( flag == 0 ) cout << 0 << endl << num << endl;
	else {
		for ( int i = 0; i < j; i ++ ) {
			if ( sign == 0 && shang[i] == 0 );
			else {
				cout << shang[i];
				sign = 1;
			}
		}
	cout << endl;
	cout << num ;
	}
	return 0;
}


int main()
{
    char digit[100],result[100];
	gets(digit);
	int i,a,n,c,s;
	n=strlen(digit);
	for(i=0;i<n;i++)
	{
		if(i==0) a=digit[i]-'0';
		else a=c*10+digit[i]-'0';
		result[i]=a/13+'0';
		c=a%13;
	}
	if((result[0]=='0' && n==1)||(result[1]=='0' && n==2))
		printf("0\n");
	else
	{for(i=0;i<3;i++)
	{
		if(result[i]!='0') {s=i;break;}
	}
	for(i=s;i<n;i++)
		printf("%c",result[i]);
	printf("\n");}
	printf("%d",c);
	return 0;
}


int main()
{
char str[101];
int answer[101];
memset(answer,0,sizeof(answer));
int p,q,flag=0,j,i,k;
cin>>str;
//cout<<str<<endl;
i=0;
for(j=0;j<strlen(str);j++)
   {
    //cout<<str<<"]]]]]]"<<endl;
   p=0;
   for(k=i;p<13;k++)
       {if(k>=strlen(str))
          break;
       p=p*10+str[k]-'0';
	   }
  // cout<<p<<endl;
  // cout<<k-1<<endl;
   j=k-1;
   answer[j]=p/13;
   //cout<<answer[j]<<endl;
   p=p%13;
   q=p;
   for(int k=j;k>=i;k--)
     {
      str[k]=p%10+'0';
	  p=p/10;
	  }
   }
for(i=0;i<j;i++)
   {
   if(answer[i]!=0)
      flag=1;
   if(flag)
     cout<<answer[i];
	 }
if(!flag)
cout<<0;
cout<<endl<<q<<endl;
return 0;
    }


int main()
{
	char ch[110];
	cin>>ch;
	int shu[110];
	for (int i=0;i<strlen(ch);i++)
		shu[i]=ch[i]-'0';
	if (strlen(ch)<=2 && shu[0]*10+shu[1]<13)
	{
		cout<<0<<endl;
		if (strlen(ch)==2) cout<<shu[0]<<shu[1]<<endl;
		else cout<<shu[0];
	}
	else
	{
		int count=2;
		int yushu=(shu[0]*10+shu[1])%13;
		int shang=(shu[0]*10+shu[1])/13;
		if (shang!=0) cout<<shang;
		while (count<strlen(ch))
		{
			cout<<(yushu*10+shu[count])/13;
			yushu=(yushu*10+shu[count])%13;
			count++;
		}
		cout<<endl;
		cout<<yushu;
	}
	return 0;
}


char zhengshu[202]={0};
int numout[402]={0},numin1[402]={0},num[202]={0},lenout,len1,len2;
int main()
{
	int i,pd=0,bg,tw=0,nu;
	cin.getline(zhengshu,202);//????????????
	len1=strlen(zhengshu);
	for(i=0;i<len1;i++)numin1[i]=zhengshu[i]-48;
	tw=numin1[0];
	for(i=0;i<len1-1;i++)
	{
		nu=tw*10+numin1[i+1];
		numout[i]=nu/13;
		tw=nu%13;
	}
	bg=!numout[0];
	for (i=bg;i<len1-1;i++)cout<<numout[i];
	if(len1<=2&&numout[0]==0)cout<<0;
	cout<<endl;
	cout<<tw;
	return 0;
}


int main()
{
    int i, j;
    char zheng[100];
    int shang[100], yushu;
    cin.getline(zheng, 100);
    int len = strlen(zheng);
    yushu = zheng[0] - '0';
    if (len == 1)
    {
        cout << 0 << endl <<  yushu << endl;
    }
    else
    {
        if (len == 2 && yushu * 10 + zheng[1] - '0' < 13)
        {
            cout << 0 << endl << yushu * 10 + zheng[1] - '0' << endl;
        }
        else
        {
            if (yushu * 10 + zheng[1] - '0' < 13)
            {
                yushu = yushu * 10 + zheng[1] - '0';
                j = 0;
                for (i = 2; i < len; i++)
                {
                     shang[j++] = (yushu * 10 + zheng[i] - '0') / 13;
                     yushu = (yushu * 10 + zheng[i] - '0') % 13;
                }
                for (i = 0; i < j; i++)
                {
                     cout << shang[i];
                }
                cout << endl << yushu;
            }
            else
            {
                j = 0;
                for (i = 1; i < len; i++)
                {
                    shang[j++] = (yushu * 10 + zheng[i] - '0') / 13;
                     yushu = (yushu * 10 + zheng[i] - '0') % 13;
                }
                for (i = 0; i < j; i++)
                {
                     cout << shang[i];
                }
                cout << endl << yushu;
            }
        }
    }
    return 0;
}


char divider[101] = {0},answer[100] = {0};
int divide13(int);

int main(){
	int num;char *p;
	cin>>divider;
	num = divide13(strlen(divider));
	for(p = answer;*p == '0';++p);      //????????????
	if(*p)cout<<p<<endl<<num<<endl;
	else cout<<"0\n"<<num<<endl;
	return 0;
}

int divide13(int len){
	int num = 0,pos = 0,ans;
	for(;pos < len;++pos){
		num = 10 * num + divider[pos] - '0';
		if(num < 13){   //??????
			answer[pos] = '0';
		}
		else{
			ans = num/13;
			answer[pos] = '0' + ans;
			num -= 13 * ans;
		}
	}
	return num;
}


/*??(12-11) ??13*/

int main()
{
	char a[101];
	cin>>a;
	int len;
	len=strlen(a);
	int b[101],i,c[101];
	for(i=1;i<=len;i++) b[i]=a[i-1]-'0';
	int hand=0;
	i=2;
	int num=b[1];
	while(i<=len)//????
	{
		num=num*10+b[i];
		hand++;
		c[hand]=num/13;
		num=num%13;
		i++;
	}
	i=1;
	if(hand==0) cout<<"0"<<endl;
	else
	{
		while(c[i]==0 && i<hand) i++;
		for(;i<=hand;i++) cout<<c[i];
		cout<<endl;
	}
	cout<<num<<endl;
	return 0;
}


int main()
{
	char input[101];
	cin >>input;
	int length=strlen(input),result[101],count=0,yu=0;
	while (count<length)
	{
		yu=yu*10+input[count]-'0';
		result[count]=yu/13;
		yu%=13;
		count++;
	}
	int head=0;
	for (int i=0;i<count;i++)
	{
		if (head==0&&result[i]!=0) head=1;
		if (head==1)
		{
			cout <<result[i];
		}
	}
	if (head==0) cout <<"0";
	cout <<endl;
	cout <<yu <<endl;

	return 0;
}


int main()
{
	char beDiv[101];
	int i, r, tell, lenth;
	int result [101];
	cin >> beDiv;
	for(i = 0, r = 0; beDiv[i] != '\0'; i++)
	{
		r = r * 10 + beDiv[i] - '0';
		result[i] = r / 13;
		r %= 13;
	}
	lenth = i;
	if((lenth == 2 && (beDiv[0] - '0') * 10 + beDiv[1] - '0' < 13)
             || lenth == 1)
		cout << '0' << endl;
	else
	{
                  for(i = 0, tell = 0; i < lenth; i++)
		{
		    if(result[i] != 0)
			    tell = 1;
		    if(tell)
			    cout << result[i];
		}
	}
	cout << endl << r << endl;
	return 0;
}


int main ()
{

char a[200];
cin>>a;
int x[200],b[200],i;
for( i=0;i<strlen(a);i++)
x[i]=a[i]-'0';
i=0;
int s=0,temp=0;
while(i<strlen(a))
{
 temp=temp*10+x[i++];
b[s++]=temp/13;
temp=temp%13;
}

int k=0;
while(b[k]==0&&k<s)
k++;

if(k==s)
{cout<<0<<endl<<temp%13<<endl;return 0;}
for(int i=k;i<s;i++)
cout<<b[i];
 cout<<endl<<temp%13<<endl;

	return 0;
}


char num[105];
int begin[105]={0},temp=0,len,i;
int main()
{
    cin.getline(num,105);
    len=strlen(num);
    for(i=0; i<len; i++)
        begin[i]=num[i]-'0';
    if(len==1) cout<<"0"<<endl<<begin[0]<<endl;
    else if(len==2)
    {
           temp=begin[0]*10+begin[1];
           cout<<temp/13<<endl;
           cout<<temp%13<<endl;
    }
    else if(len>2)
    {
           temp=begin[0]*10+begin[1];
           if(temp>=13)
           {
                  cout<<temp/13;
                  temp=temp%13;
           }
           for(i=2;i<len;i++)
           {
                  temp=temp*10+begin[i];
                  cout<<temp/13;
                  temp=temp%13;
           }
           cout<<endl<<temp<<endl;
    }

    return 0;
}


int main(){
	char num[101], quot[101];
	int r = 0, index = 0;

	cin >> num;
	for (int i = 0; num[i] != '\0'; i++){
		r = r * 10 + num[i] - '0';
		if (r < 13){
			if (index != 0)
				quot[index++] = '0';
		}else{
			quot[index++] = r / 13 + '0';
			r = r % 13;
		}
	}
	if (index == 0){
		cout << 0 << endl;
	}else{
		quot[index] = '\0';
		cout << quot << endl;
	}
	cout << r << endl;
	return 0;
}


int num(char x);

int main()
{
	char z[105];
	scanf("%s",z);
	int i;
	int mid=num(z[0]);
	int m;
	if((z[2]==0 && num(z[0])*10+num(z[1])<13))
	{
		printf("0\n%d",num(z[0])*10+num(z[1]));
	}
	else if(z[1]==0)
	{
		printf("0\n%d",num(z[0]));
	}
	else
	{
		for(i=1;z[i]!=0;i++)
		{
			mid=mid*10;
			mid += num(z[i]);
			m=0;
			if(i==1 && mid<13)
			{
				continue;
			}
			while(mid>=13)
			{
				m++;
				mid-=13;
			}
			printf("%d",m);
		}
		printf("\n");
		printf("%d",mid);
	}
	return 0;
}

int num(char x)
{
	int a;
	a=(int)x;
	a=a-48;
	return a;
}


int main()
{
	char mun[100];
	int i, len, mod = 0, flag = 0;
	cin >> mun;
	len = strlen(mun);
	for (i = 0; i < len; i++)
	{
		mod = mod * 10 + mun[i] - '0';
		if (flag == 0 && (mod / 13) == 0)
			continue;
		else
		{
			cout << mod / 13;
			flag = 1;
		}
		mod = mod % 13;
	}
	if (flag == 0)
		cout << 0;
	cout << endl << mod << endl;
	return 0;
}


int main()
{
	char num[200];
	int i, count = 0, mod = 0, div[200];
	cin >> num;
	for (i = 0; num[i] != '\0'; i++)
	{
		count++;
		div[i] = (num[i] - 48 + mod) / 13;
		mod = (num[i] - 48 + mod) % 13;
		mod *= 10;
	}
	for (i = 0; i < count; i++)
	{
		if (div[i] != 0)
		{
			for (int j = i; j < count; j++)
			{
				cout << div[j];
			}
			cout << endl << mod / 10 << endl;
			return 0;
		}
		if (i == count - 1)
		{
			cout << 0 << endl;
			cout << mod / 10 << endl;
		}
	}
	return 0;
}


char s[1000];
int i ,len,sum,p;
int flag;
void main()
{
	scanf("%s",s);
	len = strlen(s);
	sum = 0 ; flag = 1;
	for (i = 0; i < len ; ++i)
	{
		sum =(sum*10+s[i]-'0');
		p = sum/13;
		sum = sum%13;
		if (!p && flag) continue;
		flag = 0;
		printf("%d",p);
	}
	if (flag) printf("%d",0);
	printf("\n");
	printf("%d\n",sum);
}


main()
{
      int i,chu,yu=0,count=0,shang[100],count2=0;
      char a[100];
      gets(a);
      for(i=0;i<100;i++)
      {
                        chu=yu*10+(int)(a[i]-'0');
                        shang[i]=chu/13;
                        count2++;
                        yu=chu%13;
                        if(a[i+1]=='\0')break;
      }
      if(count2==1 || count2==2){count=count2-1;}
      else if(shang[1]==0)count=2;
      else count=1;
      for(i=count;i<count2;i++)
      {
                               printf("%d",shang[i]);
      }
      printf("\n%d",yu);
}


main()
{
      char num[101];
      int i,first,lenth,mod,cache;
      gets(num);
      lenth=strlen(num);
      int bit[lenth];
      for(i=0;i<lenth;i++)
      bit[i]=num[i]-'0';
      if(lenth==1)
      printf("0\n%d",bit[0]);
      else if(lenth==2&&bit[0]*10+bit[1]<13)
      printf("0\n%d",bit[0]*10+bit[1]);
      else
      {
            first=bit[0]*10+bit[1];
            if(first/13!=0)
            printf("%d",first/13);
            mod=first%13;
            for(i=2;i<lenth;i++)
            {
                     cache=mod*10+bit[i];
                     printf("%d",cache/13);
                     mod=cache%13;
            }
            printf("\n%d",mod);
      }
      getchar();
      getchar();
}


int main()
{
	char str[100];
	cin >> str;
	int len = strlen(str);
	int num1[100];
	int num2[100];
	int i;
	int num, r;
	for (i = 0; i < len; i++)
		num1[i] = str[i] - '0';
	if (len >= 3)
	{
		for (i = 0; i < len - 1; i++)
		{
			num = num1[i] * 10 + num1[i + 1];
			num2[i] = num / 13;
			r = num % 13;
			num1[i + 1] = r;
		}
		if (num2[0] != 0)
			for (i = 0; i < len -1; i++)
				cout << num2[i];
		else
			for (i = 1; i < len - 1; i++)
				cout << num2[i];
		cout << endl;
		cout << r << endl;
	}
	else if (len == 2)
	{
		int s;
		num = num1[0] * 10 + num1[1];
		s = num / 13;
		r = num % 13;
		cout << s << endl;
		cout << r << endl;
	}
	else
	{
		cout << 0 << endl;
		cout << num1[0] << endl;
	}
	return 0;
}


int strbigint(char*str,int*a)
{
    int len=strlen(str);
    int i;
    for(i=0;i<len;i++)
    a[len-i-1]=str[i]-'0';
    return len;
}
void print_bigint(int*a,int len)
{
     int k=len-1;
     while(a[k]==0&&k>1)
     {
                        k--;
                        }
     int i;
     for(i=k;i>0;i--)
     printf("%d",a[i]);
     }
main()
{
      int a[100],alen,b[100],blen,i;
      char c[100];
      scanf("%s",c);
      alen=strbigint(c,a);
      if(alen==1)
      printf("%d\n%d",0,a[0]);
      else
      {
      for(i=alen-1;i>0;i--)
      {
                        b[i]=(10*a[i]+a[i-1])/13;
                        a[i-1]=(10*a[i]+a[i-1])%13;
                        }
      print_bigint(b,alen);
      printf("\n");
      printf("%d",a[0]);
      }
      }


int lenth,num[110];
void function(int i);
int main()
{
	char a[110],s;
	int i=0,j=0,special;
	while((s=cin.get())!='\n')
	{a[i]=s;i++;}lenth=i-1;
	for(i=0;i<=lenth;i++)
		num[i]=a[i]-'0';
	//??????int??
	if(lenth<1)
		{special=num[0];
	cout<<special/13<<endl;
	cout<<special%13;}
	else if(lenth==1)
	    {special=num[0]*10+num[1];
	cout<<special/13<<endl;
	cout<<special%13;}
	else
	function(0);

	return 0;
}
int ans[110],yu; //???lenth-1
void function(int i)
{  if(i<=lenth-1){
   ans[i]=(10*num[i]+num[i+1])/13;
   num[i+1]=(10*num[i]+num[i+1])%13;
   function(i+1);}
   else
   {if(ans[0]!=0)cout<<ans[0];
	for(i=1;i<=lenth-1;i++)
	    cout<<ans[i];
    cout<<endl;
    yu=num[i];
	cout<<yu;
   }

}


int main()
{
    char a[105]; int t[100], u[100], flag=1, tmp, j; memset (a,0,sizeof(a)); memset(t,0,sizeof(t));memset (u,0,sizeof(u));
    cin.getline(a, 105);
    for (int i=0; i<strlen(a); i++)
        t[i]=a[i]-'0';
    if (strlen(a)==1)
        cout << t[0]/13 << endl << t[0]%13 << endl;
    else if (strlen(a)==2)
        cout << (10*t[0]+t[1])/13<< endl<< (10*t[0]+t[1])%13 <<endl;
    else
    {
        tmp=10*t[0]+t[1]; u[0]=tmp/13;
        for (int i=2;i<strlen(a);i++)
        {
            tmp%=13;
            tmp=t[i]+tmp*10;
            u[flag]=tmp/13;
            flag++;
        }
        tmp%=13;
        for (j = 0; j < flag; j++)
            if (u[j]!=0) break;
        for (;j<flag;j++)
            cout << u[j];
        cout << endl;
        cout << tmp<<endl;
    }
    return 0;
}


int main()
{
   int i,len,remain,num,size=0;
   char N[101];
   cin>>N;
   len=strlen(N);
   remain=0;
   if(len==1)
	   cout<<0<<endl<<N<<endl;
   else if(len==2 && N[0]=='1' && N[1]<'3')
            cout<<0<<endl<<N<<endl;
   else
   {
       for(i=0;i<len;i++)
	   {
          num=remain*10+N[i]-'0';
	      if(num<13)
		  {
		      remain=num;
	          N[i]=0+'0';
		  }
	      else
		  {
	          N[i]=num/13+'0';
              remain=num%13;
		  }

	   }
       for(i=0;i<len;i++)
	   {
          if(N[i]!='0')
		  {
	         size=i;
		     break;
		  }
	   }
       for(i=size;i<len;i++)
       cout<<N[i];
       cout<<endl;
       cout<<remain<<endl;
   }
  return 0;
}


main()
{
      int d,q,r,l,i,m;
      char dividend[10000],quotient[10000];
      scanf("%s",dividend);
      l=strlen(dividend);
      if(l==1)
      printf("%c\n%d",'0',dividend[0]-'0');
else{
      r=dividend[0]-'0';
      for(i=1;i<l;i++)
      {
                      m=dividend[i]-'0'+10*r;
                      q=m/13;
                      r=m%13;
                      quotient[i-1]=q+'0';
      }
      quotient[l-1]='\0';
      if(quotient[0]=='0'&&l>2)
      {for(i=0;i<l;quotient[i]=quotient[i+1],i++);}
      printf("%s\n%d",quotient,r);
    }
}


int main()
{
	char num[101] = {0},ans[101]={0};
	char ch;
	int ni,sh = 0,i,l,ys = 0,flag;
	cin >> num;
	l = strlen(num);
	for (i = 0;i <= l-1;i++)
	{
		ni = num[i] - '0';
		ys = ys * 10 + ni;
		sh = ys / 13;
		ch = (char) (sh + 48);
		ans[i] = ch;
		ys = ys - sh * 13;
	}
	flag = 0;
	for (i = 0;i <= l-1;i++)
	{
		if (ans[i] != '0')
			flag = 1;
		if (flag == 1)
			cout << ans[i] ;
	}
	if (flag == 0)
		cout << '0';
	cout << endl;
	cout << ys;
    return 0;
}


main()
{
 char N[101];
 int n[100], dvd[100], left=0, len;
 memset(dvd, 0, 100*sizeof(int));
 int i, temp;
 gets(N);
 len=strlen(N);
 for (i=0; i<len; i++)
   n[i]=N[i]-'0';
 for (i=0; i<len; i++)
 {
  temp=left*10+n[i];
  dvd[i]=temp/13;
  left=temp%13;
 }
 for (i=0; i<len; i++)
 {
  if (dvd[i]!=0)
     break;
 }
 if (i==len) printf("0\n");
 else
 {
  for (; i<len; i++)
  {
   printf("%d", dvd[i]);
  }
  printf("\n");
 }
 printf("%d", left);

}


int main()
{
	char number[110]={0};
	cin>>number;
	char shang[110]={0};
	int yushu=0;
	if(strlen(number)>=2)//????????
	{
	for(int i=0;i<strlen(number)-1;i++)//??????
	{
		int a=(number[i]-'0')*10+(number[i+1]-'0');
		shang[i]=a/13+'0';
		number[i+1]=a%13+'0';
	}
	yushu=number[strlen(number)-1]-'0';
	}
	else
	{
		shang[0]='0';
		yushu=number[strlen(number)-1]-'0';
	}
	if(shang[0]!='0'||shang[1]==0)//??
	{
		cout<<shang<<endl;
	}
	else
	{
		for(int i=1;i<strlen(shang);i++)
		{
			cout<<shang[i];
		}
		cout<<endl;
	}
	cout<<yushu;//??

	return 0;
}


int main()
{
	char str[100];
	char res[100];
	scanf("%s",str);
	int n= strlen(str);
	int mod = 0;
	int shang;
	mod = str[0]-'0';
	int nLag = 1;
	for(int i=1;i<n;i++)
	{
		mod = mod*10+str[i]-'0';
		shang = mod/13;
		if(i==1 && shang==0)
			nLag = 2;
		res[i] = '0'+shang;
		mod = mod%13;
	}
	res[n] = '\0';
	if(n<=nLag)
		printf("%s\n","0");
	else
		printf("%s\n",res+nLag);
	printf("%d\n",mod);
}


int main()
{
	char num[200];
	int innum[200],outnum[200],temp=0,i,len,mark=0;//temp???????13???
	cin.getline(num,200);
	len=strlen(num);
	for(i=0;i<len;i++)
		innum[i]=num[i]-'0';//??????
	for(i=0;i<len;i++)
	{
		temp=temp*10+innum[i];
		if(temp/13)
		{
			outnum[i]=temp/13;//???13?????outnum?
			temp=temp%13;//temp??temp%13
		}
		else
			outnum[i]=0;
	}
	for(i=0;i<len;i++)
	{
		if(mark==0&&outnum[i]==0)//mark?????0???
			continue;
		if(outnum[i])
			mark=1;
			cout<<outnum[i];
	}
	if(!mark)
		cout<<'0'<<endl<<temp;
	else cout<<endl<<temp;
		return 0;

}


/*
 * yuesefuwenti.cpp
 *
 *  Created on: 2012-12-8
 *      Author: wenjun
 */
int main ()
{
	char a[110];
	int *p;
	int b[110],x,len;
	while(cin>>a){
		len=strlen(a);
	for(int i=0;i<len;i++)
		b[i]=a[i]-'0';
	//for(int i=0;i<len;i++)
		//	cout<<b[i];
	x=0;
	for(int i=0;i<len;i++)
	{
		b[i]=10*x+b[i];
		x=b[i]%13;
		b[i]=b[i]/13;

	}
	int k=0;
	while(b[k]==0)
		k++;
	if(k==len)  cout<<"0";
	for(int i=k;i<len;i++)
		cout<<b[i];
	cout<<endl;
	cout<<x<<endl;
    }
	return 0;
}


main()
{
int len,i,P=0;
int panel=0;
char a[100];
int b[100];
int p[100];

scanf("%s",a);
len=strlen(a);

for(i=0;i<=len-1;i++)
                   {
                   b[i]=a[i]-'0';
                   //printf("%d",b[i]);
                   }
for(i=0;i<=len-1;i++)
                   {
                   panel=10*panel+b[i];
                   p[i]=panel/13;
                   if(p[i]!=0)
                   P=1;
                   panel=panel-p[i]*13;
                   if(P==0)
                              continue;
                   else
                       printf("%d",p[i]);
                   }
if(P==0)
printf("0");
printf("\n%d",panel);

}


int main()
{
    char shuru[1000];
    char shuchu[1000];
    scanf("%s",shuru);
    int i,length,yushu;
    int a[1000][2];
    int shang[1000];
    length=strlen(shuru);

    for(i=0;i<length;i++)
    {
        a[i][0]=shuru[i]-'0';
    }
    yushu=0;
    int yushu2;
    for(i=0;i<length;i++)
    {
       yushu=yushu*10+a[i][0];
       if(yushu>=13)
       {
          yushu2=yushu;
          yushu=yushu%13;
          shang[i]=yushu2/13;
       }
       else
       {
          shang[i]=0;
          yushu=yushu;
       }
    }

    if(shang[0]==0&&shang[1]!=0)
    {
       for(i=1;i<length;i++)
       {
         shuchu[i-1]=shang[i]+'0';
       }
       shuchu[length-1]='\0';
    }
    else if(shang[0]==0&&shang[1]==0)
    {
       for(i=2;i<length;i++)
       {
         shuchu[i-2]=shang[i]+'0';
       }
       shuchu[length-2]='\0';
    }
    else
    {
       for(i=0;i<length;i++)
       {
         shuchu[i]=shang[i]+'0';
       }
    }
    shuchu[i-1]='\0';
    int t;
    t=a[0][0]*10+a[1][0];
    if(length==1&&a[0][0]==0)
    {
    char c[2];
    c[0]='0';

    printf("%s\n",c);
    printf("0");
    }
    else if(length==1)
    {
    char c[2];
    c[0]='0';

    printf("%s\n",c);
    printf("%d",yushu);
    }
    else if(t<13&&length==2)
    {
    char c[2];
    c[0]='0';

    printf("%s\n",c);
    printf("%d",yushu);
    }
    else
    {
    printf("%s\n",shuchu);
    printf("%d",yushu);
    }
    getchar();
    getchar();
}


int main(void)
{
    int i, j=0 ,k=0 ,n,t=0, ok=0;
    char str[MAX], output[MAX];
    gets(str);
    n = strlen(str);

    while ((k<n))
    {
        t = t*10 + (str[k]-'0');
        k++;
            //printf("%d\n",t);
        if(t>13)
        {
            ok=1;
            // putchar(output[j-1]);
        }
        if(ok)
        {   output[j]=('0'+t/13);
            //printf("%d\n",t/13);
            t = t%13;
            j++;
        }

        //printf("%d\n",(str[n]-'0')*10);

        //printf("%d\n",t);
    }
    output[j]='\0';
    if(ok)
    puts(output);
    else
    printf("0\n");
    printf("%d",t);
    return 0;
}


int main ()
{
	char ch[100] = {0};
	char shang[100] = {0};
	cin >> ch;
	int now = 0;
	for ( int i = 0, j = 0; i < strlen(ch); i ++, j ++ )
	{
		now = now * 10 + ch[i] - '0';
		if ( j == 0 && now/13 == 0 ) j--;
		else shang[j] = now/13 + '0';
		now = now%13;
	}
	if ( shang[0] == 0 ) cout << "0" << endl;
	else cout << shang << endl;
	cout << now;
	return 0;
}


void main()
{
    int result[100],length,num[101]={0},i,k,small,large,not_zero;
    for(i=0;i<100;i++)
    {
         result[i]=-1;
    }
    char c[101];
    scanf("%s",c);
    length=strlen(c);
    for(i=0;i<length;i++)
    {
         num[i]=(int)c[i]-'0';
    }
    for(i=0;i<length;i++)
   {
        result[i]=num[i]/13;
        num[i+1]=num[i+1]+(num[i]%13)*10;
   }
   for(i=0;i<100;i++)
   {
       if(result[i]!=0)
       {
           small=i;
           break;
       }
   }
   for(i=99;i>=0;i--)
  {
       if(result[i]!=-1)
       {
           large=i;
           break;
       }
  }
   for(i=small;i<=large;i++)
   {
      printf("%d",result[i]);
      not_zero=1;
   }
   if(not_zero==1)
   {
       printf("\n");
       printf("%d\n",num[length]/10);
   }
   else
   {
       printf("0\n");
       printf("%s",c);
   }
}


int sn(char s)
{
    char *p;
    p=&s;
    return atoi(p);
}
int yu=0;
void chufa(char *p1,char*p2)
{
     int l1=strlen(p1);
     if(l1==1)
     {
              p2[0]='0';
              yu=sn(p1[0]);
     }
     for(int i=0;i<l1-1;i++)
     {
             int flg=0;
             if(i==0) flg=1;
             int temp=0;
             temp=(flg*10*sn(p1[i])+sn(p1[i+1])+yu*10)%13;
             p2[i]='0'+(flg*10*sn(p1[i])+sn(p1[i+1])+yu*10-temp)/13;
             yu=temp;
     }
}
main()
{
      char s[100];
      gets(s);
      int len=strlen(s);
      char shang[len-1];
      chufa(s,shang);
      for(int i=0;;i++)
      {
              if(i==0&&shang[i]=='0')
              if(len==1||len==2)
              printf("%c",shang[i]);
              else continue;
              else if(i!=len-1) printf("%c",shang[i]);
              if(i==len-1)
              break;

      }
      printf("\n%d",yu);

}


int main()
{
	char N[101];
	cin.getline(N, 101);
	int l = strlen(N);
	int quo[101], num[101], i, j = 0, r = 0;
	for(i = 0; i < l; i++)
		num[i] = N[i] - '0';
	for(i = 0; i < l; i++)
	{
		quo[i] = (r * 10 + num[i]) / 13;
		r = (r * 10 + num[i]) % 13;
	}
	int t = 0, temp;
	while(quo[t] == 0)
	{
		t++;
		temp = t;
	}
	if(temp == l) cout << "0";
	else
	{
		for(; t < l; t++) cout << quo[t];

	}
	cout << endl;
	cout << r << endl;
	return 0;
}


int main()
{
	char num[105];
	int len;
	int answer[105]={0};
	int r=0;

	cin.getline(num,105);
	len=strlen(num);

	int i;

	for (i=0;i<len;i++)
	{
		r=r*10+num[i]-'0';
		answer[i]=r/13;
		r=r%13;
	}

	i=0;
	while(answer[i]==0)
		i++;
	for (;i<len;i++)
		cout<<answer[i];

	if (i>len+1)
		cout<<'0';

	cout<<endl<<r;

	return 0;
}


int main()
{
	char num[101], result[100];
	int r = 0, i, len, j, temp;
	cin.getline(num,100);
	len = strlen(num);
	for (i = 0; i < len; i++)
	{
		temp = (int)num[i] - 48;
		result[i] = ((r * 10 + temp) / 13) + 48;
		r = (r * 10 + temp) % 13;
	}
	for (j = 0; j < len; j++)
	{
		if (result[j] != '0')
			break;
	}
	if (j == len)
	{
		cout << 0 <<endl;
		cout << r ;
	}
	else
	{
		for (j; j < len; j++)
		    cout << result[j];
	    cout <<endl;
	    cout <<r;
	}
	return 0;
}


char c[200];//??????
int n[200];//??????
int main()
{
	int number,len,i;
	while(cin>>c)
	{
		len=strlen(c);
		for(i=1;i<=len;i++) n[i]=c[i-1]-'0';
		if(len==1) {cout<<"0"<<endl<<n[1]<<endl;continue;}
		if(len==2)
		{
			number=10*n[1]+n[2];
			cout<<number/13<<endl<<number%13<<endl;
			continue;
		}
		number=n[1]*10+n[2];
		i=2;
		if(number<13) number=10*number+n[++i];//???????????13
		cout<<number/13;
		while(i<len)
		{
			number=(number%13)*10+n[++i];
			cout<<number/13;
		}
		cout<<endl<<number%13<<endl;
	}
	return 0;
}


int main()
{
	int i,j=0,t,shang,yu,temp=0;
	char mult1[len];
	scanf("%s",mult1);
	int len1 = strlen(mult1);
	int *c1 = (int *)malloc(sizeof(int)*len1);
	for(i=0; i<len1; i++)
	c1[i]=(int)mult1[i]-48;
	int *result = (int *)malloc(sizeof(int)*(len1));
	if((len1==2&&c1[len1-2]==1&&c1[len1-1]<3)||len1==1)
	{
		printf("0\n");
		if(len1==2)
		printf("%d",c1[len1-1]+c1[len1-2]*10);
		else
		printf("%d",c1[len1-1]);
	}
	else
	{
		for(i=0;i<len1-1;i++)
		{
			t=(c1[i]*10+c1[i+1]);
			shang=t/13;
			result[j]=shang;
			j++;
			yu=t%13;
			c1[i+1]=yu;

		}
		if(result[0]!=0)
		{
			for(i=0;i<len1-1;i++)
			printf("%d",result[i]);
		}
		else
		{
			for(i=1;i<len1-1;i++)
			printf("%d",result[i]);
		}
		printf("\n");
		printf("%d",yu);
	}
	free(c1);
	free(result);
	return 0;
}


int main()
{
    char a[110];
    cin>>a;
    int b[110];
    int temp=0;
    if(strlen(a)<=5)
    {
                    int t=atoi(a);
                    cout<<t/13<<endl;
                    cout<<t%13<<endl;
    }//????????
    else
    {
         for(int i=0;i<strlen(a);i++)
        {
                temp=temp*10+(a[i]-'0');
                b[i]=temp/13;
                temp=temp%13;
        }//????
        if(b[1]!=0)
        {
                   cout<<b[1];
        }
        for(int i=2;i<strlen(a);i++)
        {
                cout<<b[i];
        }
        cout<<endl<<temp<<endl;
    }
    return 0;
}


int main()
{
	char a[100];
	cin>>a;
	int b[100],shang[100];
	int len=strlen(a);
	if(len==1){
		cout<<'0'<<endl;
		cout<<a<<endl;
		return 0;
	}
	int i=0;
	for(i=0;i<len;i++)
		b[len-1-i]=(int)a[i]-48;
	if(len==2&&b[1]*10+b[0]<13){
		cout<<'0'<<endl;
		cout<<b[1]*10+b[0]<<endl;
		return 0;
	}
	int left=b[len-1];
	int sum=0;
	for(i=len-2;i>=0;i--){
		sum=left*10+b[i];
		shang[i]=sum/13;
		left=sum%13;
	}
	int temp=len-2;
	if(shang[temp]==0)temp--;
	for(i=temp;i>=0;i--)
		cout<<shang[i];
	cout<<endl;
	cout<<left<<endl;
	return 0;
}


int main()
{
	char c;
	int i, flag = 0, cnt = 0, k;
	while (cin >> c)
	{
		cnt = cnt * 10 + (c - '0');
		k = cnt / 13;
		if (k == 0)
			{
				if (flag) cout << k;

			}
		else {cout << k; flag = 1;}
		cnt = cnt - k * 13;
	}
	if (!flag) cout << 0;
	cout << endl << cnt << endl;

	return 0;
}


void f(char a[],char b[],char result[]);
int num[100]={0};
int main()
{
 char str[200],str2[200],result[200];
 int i,j,k=0;
 gets(str);
if(strlen(str)==1||(strlen(str)==2)&&str[0]=='1'&&str[1]<'3'){cout<<0<<endl;cout<<str;}
else{
 str2[0]='1';str2[1]='3';
 for(i=2;i<strlen(str);i++)
 {
  str2[i]='0';
 }str2[i]='\0';
 while(strlen(str2)>=2)
 {
  while(strlen(str)>strlen(str2)||(strcmp(str,str2)!=-1&&strlen(str)==strlen(str2)))
  {
   num[k]++;
   f(str,str2,result);
   strcpy(str,result);
  }
  k++;
  str2[strlen(str2)-1]='\0';
 }
 //cout<<"The result is:"<<endl;
if(num[0]==0){
 for(i=1;i<k;i++)
  cout<<num[i];
 cout<<endl;
 cout<<str;}
else
{for(i=0;i<k;i++)
  cout<<num[i];
 cout<<endl;
 cout<<str;}}

 return 0;
}

void f(char a[],char b[],char result[])
{
 if(strcmp(a,b)==0){result[0]='0';result[1]='\0';return;}
 else{
 int la=strlen(a);
 int lb=strlen(b);
 int t=0,c=0,s;
 char tmp;
 while(la>=0)
 {
  //cout<<"f function: a["<<la<<"]="<<a[la]<<",  b["<<lb<<"]="<<b[lb]<<endl;
  if(lb<0)s=a[la--]-'0';
  else s=a[la--]-b[lb--];
  result[t++]=s-c+'0';
  if (result[t-1]<48){result[t-1]+=10;c=1;}
  else c=0;
 }
 while(result[t-1]=='0'){result[t-1]='\0';t--;}
 int lresult=t-1;
 for(int i=0;i<=lresult/2;i++)
 {
  tmp=result[i];
  result[i]=result[lresult-i];
  result[lresult-i]=tmp;
 }result[lresult]='\0';
 }
}


char li[110];
char up[110];
int num=0;
void chu(int i)
{
	int bc;
	bc=(li[i]-'0')*100+(li[i+1]-'0')*10+li[i+2]-'0';
	int yu;
	int jie;
	jie=bc/13;
	yu=bc%13;
	if(num==0&&jie>10)
	{

			up[num]=jie/10+'0';
			num=num+1;
			up[num]=jie-jie/10*10+'0';
			num=num+1;

	}
	else
	{
		up[num]=jie+'0';
		num=num+1;
	}
	li[i]=0+'0';
	if(yu>10)
	{
		li[i+1]=yu/10+'0';
		li[i+2]=yu-10+'0';
	}
	else
	{
		li[i+1]='0';
		li[i+2]=yu+'0';
	}
}
int main()
{
	memset(li,'\0',sizeof(li));
	memset(up,'\0',sizeof(up));
	while(cin>>li)
	{

		num=0;
		int len;
		len=strlen(li);
		if(len>3){
		for(int j=0;j<len-2;j++)
		{
			chu(j);
		}
		cout<<up<<endl;
		if(li[len-2]=='1') cout<<'1';
		cout<<li[len-1]<<endl;}
		else
		{
			int t;
			t=atoi(li);
			cout<<t/13<<endl;
			cout<<t%13<<endl;
		}
		memset(li,'\0',sizeof(li));
		memset(up,'\0',sizeof(up));
	}

	return 0;
}


int main()
{
	char num[100];
	cin >> num;
	// division???????????number[i]??num[i],denominator[i]??????
	int division = 0, number[100], denominator[100], dinominator[100], rest = 0, i, j, mark;
	for (i = 0; i < 100; i++)
	{
		if (num[i] != '\0')  // ??????????????????????
		{
			number[i] = num[i] - '0';
		}
		else
		{
			break;
		}
	}               // ??????i - 1?
	if (i == 1)
	{
		cout << "0" << endl << number[0];
	}
	else if ((i == 2) && (number[0] == 1) && (number[1] <= 2))
	{
		cout << "0" << endl << number[0] * 10 + number[1];
	}

	else
	{
	rest = number[0];
	for (j = 1; j <= i - 1; j++)   // ???????1??????division???99??denominator????
	{
		division = number[j] + rest * 10;
		denominator[j] = division / 13;
		rest = division % 13;
	}
	for (j = 1; j <= i - 1; j++)
	{
		if (denominator[j] != 0)  //???????????0??
		{
			mark = j;
			break;
		}
	}
	for (j = mark; j <= i - 1; j++)
	{
		cout << denominator[j];
	}
	cout << endl;
	cout << rest;
	}
	return 0;
}


int main()
{
	const int MAX_LEN = 100;
	int num[MAX_LEN + 1], result[MAX_LEN], i, r = 0, flag = 0, k;
	char str[MAX_LEN];
	cin.getline(str, MAX_LEN + 1);
	int nlen = strlen(str);
	memset (num, 0, sizeof(num));
	memset (result, 0, sizeof(result));
	if (nlen == 1)
		cout << '0' << endl << str;
	else if (nlen == 2 && str[0] == '1' && str[1] < '3')
	{
		cout << '0' << endl << str;
	}
	else
	{
		for (i = 0; i < nlen; i++)
		{
			num[i] = str[i] - '0';
		}
		for (i = 0; i < nlen; i++)
		{
			result[i] = (r * 10 + num[i]) / 13;
			r = (r * 10 + num[i]) % 13;
			k = r;
			if (r < 0)
				break;
		}
		for(i = 0; i < nlen; i++)
		{
			if (result[i] == 0 && flag == 0)
				continue;
			else
			{
				flag = 1;
				cout << result[i];
			}
		}
		cout << endl << k;
	}
	return 0;
}


char input[200];
int output[200];
int main(){
	cin >> input;
	memset(output,0,sizeof(output));
	int length  = strlen(input);
	int remainder = 0,i;
	for(i = 0;i < length;i ++){
		remainder *= 10;
		remainder += input[i] - '0';
		if(remainder < 13){
			output[i] = 0;
		}else{
			output[i] = remainder / 13;
			remainder %= 13;
		}
	}
	for(i = 0;i < length;i ++){
		if(output[i] != 0)
			break;
	}
	if(i == length)
		cout << 0;
	else
		for(;i < length;i ++)
			cout << output[i];
	cout << endl << remainder << endl;
	return 0;
}


int f(char a)                                       //??????????????
{  if(a=='1')  return 1;
   if(a=='2')  return 2;
   if(a=='3')  return 3;
   if(a=='4')  return 4;
   if(a=='5')  return 5;
   if(a=='6')  return 6;
   if(a=='7')  return 7;
   if(a=='8')  return 8;
   if(a=='9')  return 9;
   if(a=='0')  return 0;
}
int main()
{   char a;
    int b;
    int chushu=0;
    int yushu=0;
    int shang;
    int t=0;
    int v=0;
    while(1)
      {
                 cin.get(a);
                 if(a=='\n')                    //??????
                    {   t=1;

                    }
                 b=f(a);
                 chushu=10*chushu+b;          //?????

         if(t==1)  break;                     //????
         shang=chushu/13;                    //????
         yushu=chushu%13;
         chushu=yushu;
         if(shang!=0)   v=v+1;
         if(v!=0)   cout<<shang;                         //??

      }
    if(v==0)   cout<<0;
    cout<<endl;
    cout<<yushu;
    return 0;
}


int main ()
{
	char in[110]={0};
	cin>>in;
	int num[110]={0},ans[110]={0};
	int lenth = strlen(in);
	for (int i=0;i<lenth;i++)
		num[i]=in[i]-'0';
	int r = num[0];
	for (int i=1;i<lenth;i++){
		ans[i] = (r * 10 + num[i]) / 13;
		r = (r * 10 + num[i]) % 13;
	}
	int s = 0;
	for (int i=0;i<lenth;i++){
		if (ans[i] != 0) {s = i;break;}
	}
	if (lenth<=2 && num[1]+num[0]*10<13){
		cout<<'0'<<endl<<r;
	}
	else {
	for (int i=s;i<lenth;i++)
		cout<<ans[i];
	cout<<endl<<r;
	}

	return 0;
}


/*
 * 0.cpp
 *
 *  Created on: 2011-12-30
 *      Author: Alfalfa
 */
int main() {
	char a[101], out[100];
	memset(out,100,'/');
	cin>>a;
	int len=strlen(a), temp, mod;
	temp=10*(a[0]-'0') + a[1]-'0';
	if(temp<13&&len<=2) len=1;
	for(int i=0; i<len-1; i++){
		out[i]=temp/13+'0';
		mod=temp%13;
		temp=temp%13*10+(a[i+2]-'0');
	}
	int flag=0;
	if(len==1)
		cout<<0<<endl<<a;
	else {
		for(int i=0; i<len-1; i++){
			if(out[i]!='0') flag=1;
			if(flag) cout<<out[i];
		}
		cout<<endl<<mod;
	}
}


int main()
{
	char str[101];
	cin.getline(str, 101);
	int num[101];
	int   i, j;
	for (i = 0; i < strlen(str); i ++)
		num[i]  = str[i] - '0';
	int num1[100];
	memset(num1, 0, sizeof(num1));
	for (i = 0; i < strlen(str)-1; i ++)
	{
		num1[i] = (num[i] * 10 + num[i + 1]) / 13;
		num[i + 1]  = (num[i] * 10 + num[i + 1]) % 13;
	}
	j = 0;
	if (num1[j] == 0)
		j = 1;
	for (; j < i ; j ++)
		cout << num1[j];
	if (strlen(str) <= 2 && num1[0] == 0)
		cout << 0;
	cout << endl;
	cout << num[strlen(str) - 1]<< endl;
	return 0;
}


int main()
{
	char number[100];
	char result[100];
	int a=0,b=0,lenght=0,flag=0;
	scanf("%s",number);
	lenght=strlen(number);
	b=number[0]-'0';
	for(int i=0;i<lenght-1;i++)
	{
		a=b*10+(number[i+1]-'0');
		result[i]=a/13+'0';
		b=a%13;
	}
	if(lenght==1)
	{
		result[0]='0';
		result[1]='\0';
	}
	else
	{
		result[lenght-1]='\0';
		for(int i=0;result[i]!='\0';i++)
			if(result[i]!='0'&&result[i]!='\0')
			{
				flag=i;
				break;
			}
	}
	printf("%s\n%d\n",result+flag,b);
	return 0;
}


int main()
{
    char number[100];
    char quotient[100]={' '};
    cin >> number;
    int r=0;
    int i;
    for (i=0;number[i]!='\0';i++)
    {
        quotient[i]=(r*10+(number[i]-'0'))/13+'0';
        r=(r*10+(number[i]-'0'))%13;
    }
    int len=strlen(quotient);
    if (atoi(number)<13)
    {
        cout << "0" << endl;
    }
    else
    {
    if (quotient[1]!='0')
    {
        cout << quotient[1] ;
    }
     for (i=2;i<=len-1;i++)
    {
         cout << quotient[i];
    }
    cout << '\n';
    }
    cout << r << '\n' ;

    return 0;
}


/*???????
 * thirteen.cpp
 *
 *  Created on: 2013-12-23
 *      Author: Administrator
 */
int main()
{
	char istr[101],istr1[101];
	int len=0,left=0,a=0,i=0,count=0;
	while(cin.getline(istr,101)){
		count=0;
		len=strlen(istr);
	    for(i=0;i<len;i++){
	    	a=left*10+istr[i]-'0';
	    	left=a%13;
	    	istr1[i]=a/13+'0';
	    }
	    istr1[i]='\0';
	    for(i=0;i<len;i++){
	    	if(istr1[i]!='0'||count!=0){
	    		cout<<istr1[i];
	    		count=1;
	    	}
	    }
	    if(count==0)cout<<"0";
	    cout<<endl;
	    cout<<left<<endl;
	    cin.get();
	}
	return 0;
}


int main()
{
	char t;
	int in[100],i=0,an[100];
	t=getchar();
	while(t!=10)
	{
		in[i]=t-'0';
		i++;
		t=getchar();
	}
	int j=2,n=0,temp=in[0];
	if(i!=1)
	{
		temp=10*temp+in[1];
		if(temp>=13)
		{
			an[0]=temp/13;
			temp=temp%13;
			n++;
		}
		while(j!=i)
		{
			temp=10*temp+in[j];
			an[n]=temp/13;
			temp=temp%13;
			n++;j++;
		}
		if(!n)cout<<'0';
		for(int k=0;k<n;k++)cout<<an[k];
		cout<<endl;
		cout<<temp;
	}
	else cout<<"0\n"<<in[0];
	return 0;
}


int main()
{
	int i = 0, j, k, count = 0, product[100] = {0}, remainder, numerator, left = 0;
	char num[100] = {0};
	do
	{
		cin.get(num[i]);
		i++;
	}
	while(num[i - 1] != '\n');
	for (j = i - 2; j >= 0; j -= 6)
		count += (num[j] - 48);
	for (j = i - 3; j >= 0; j -= 6)
		count += (num[j] - 48) * 10;
	for (j = i - 4; j >= 0; j -= 6)
		count += (num[j] - 48) * 100;
	for (j = i - 5; j >= 0; j -= 6)
		count -= (num[j] - 48);
	for (j = i - 6; j >= 0; j -= 6)
		count -= (num[j] - 48) * 10;
	for (j = i - 7; j >= 0; j -= 6)
		count -= (num[j] - 48) * 100;
	remainder = count % 13;
	numerator = (num[0] - 48) * 10 + (num[1] - 48);
	for (k = 0; k < i - 2; k++)
	{
		product[k] = floor(numerator / 13);
		left = numerator - 13 * product[k];
		numerator = left * 10 + (num[k + 2] - 48);
	}
	if ((product[0] == 0) && (product[1] == 0))
		cout << "0" << endl;
	if (product[0] != 0)
	{
		cout << product[0];
		for (k = 1; k < i - 2; k++)
			cout << product[k];
		cout << endl;
	}
	if ((product[0] == 0) && (product[1] != 0))
	{
		for (k = 1; k < i - 2; k++)
			cout << product[k];
		cout << endl;
	}
	cout << remainder << endl;
	return 0;
}


const long maxL=100;

char a[maxL+1];

long ans[maxL+1];

main(){
    long i,l,rest;
    scanf("%s",a);
    l=strlen(a);
    rest=0;
    for(i=0;i<l;i++){
	rest=rest*10+a[i]-'0';
	ans[i]=rest/13;
	rest%=13;
    }
    i=0;
    while((ans[i]==0) && (i<l-1))
	i++;
    for(;i<l;i++)
	printf("%ld",ans[i]);
    printf("\n%ld\n",rest);
    return 0;
}


main()
{
const int last=1000;
char s[1050];
scanf("%s",s);
int num[1050];
int len=strlen(s);
int i;
i=last+1;
for (int j=len-1;j>=0;j--)
{i--;
num[i]=(s[j]-'0');}
int st=i;
num[last+1]=0;
while (i<=last)
{
num[i+1]+=num[i]%13*10;
num[i]=num[i]/13;
i++;
}
while (num[st]==0) st++;
if (st>last) printf("0");
for (i=st;i<=last;i++)
printf("%c",num[i]+'0');
printf("\n");
printf("%d",num[last+1]/10);
}


int main()
{	char c[200];
	int zs[200],shang[200];
	int i,j,yu=0,flag=0;
	gets(c);
	for(i=strlen(c)-1;i>=0;i--){
		zs[i]=c[i]-'0';
	}
	for(i=0;i<strlen(c);i++){
		shang[i]=(yu*10+zs[i])/13;
		yu=(yu*10+zs[i])%13;
	}
	for(i=0;i<strlen(c);i++){
		if(flag){
			printf("%d",shang[i]);
		}
		if(1-flag){
			if(shang[i]!=0){
				printf("%d",shang[i]);
				flag=1;
			}
		}
	}
         if(flag==0){
		printf("0");
	}
	printf("\n");
	printf("%d",yu);
	return 0;
}


int main()
{
	char number[100 + 1];
	int a[100 + 1] ,lenth;
	int shang[100 +1] = {0} ;
	int  i , j , s;
	s = 0;

	gets(number);
	lenth = strlen(number);
	for( i = 0 ; i <= lenth - 1 ; i ++)
		a[i] = number[i] - '0';

	for( i = 0 ; i <= lenth - 1 ; i ++)
	{
		s = s * 10 + (a[i] % 13);
		shang[i] = s  / 13 ;
		s = s % 13;
	}
	for( i = 0 ; i <= lenth - 1 ; i ++)
		if(shang[i] != 0 ) break;

	if( i >= lenth)
		printf("0");
    else
	{
		for( j = i ; j <= lenth - 1 ; j ++)
		printf("%d",shang[j]);
	}
		printf("\n");
		printf("%d\n",s);

		return 0;
}


int main()
{
	char beichu[110];
	int shang[110];
	scanf("%s",beichu);
	int sheng,i;
	sheng=beichu[0]-'0';
	shang[0]=0;
	for(i=1;i<strlen(beichu);i++)
	{
		if((sheng*10+beichu[i]-'0')>=13)
		{
			shang[i]=(sheng*10+beichu[i]-'0')/13;
			sheng=(sheng*10+beichu[i]-'0')%13;
		}
		else
		{
			sheng=sheng*10+beichu[i]-'0';
			shang[i]=0;
		}
	}
	int flag=0;
	for(i=0;i<strlen(beichu);i++)
	{
		if(shang[i]!=0)
			flag=1;
		if(flag==1)
		printf("%d",shang[i]);

	}
	if(flag==0)
		printf("0");
	printf("\n%d\n",sheng);

	return 0;
}


int main()
{
	int start;
	int num[110] , mod;
	char number[110];
	int i , len ;
	cin >> number;
	len = strlen(number);
	if(len == 1)
	{
		cout << 0 << endl;
		cout << (number[0] - '0')% 13 << endl;
	}
	else if(len == 2 && number[0] == '1' && number[1] >= '0' && number[1] <= '2')
	{
		cout << 0 << endl;
		cout << (10 + number[1] - '0')% 13 << endl;
	}
	else
	{
	mod = (number[0] - '0') % 13;
	num[0] = (number[0] - '0') / 13;
	for(i = 1 ; i < len ; i++)
	{
		num[i] = (mod * 10 + number[i] - '0') / 13 ;
        mod = (mod * 10 + number[i] - '0') % 13;
	}
	for(i = 0 ; i < len ; i++)
		if(num[i] != 0)
		{
			start = i;
			break;
		}
	for(i = start ; i < len ; i++)
		cout << num[i];
	cout << endl;
	cout << mod << endl;
	}
	return 0;
}


int main(){
char cs[102];
int ys=0,c=0,s;
gets(cs);
for  (int i=0;i<strlen(cs);i++){
     c=10*ys+(int)(cs[i]-'0');
     ys=c%13;
     s=c/13;
    if (s!=0){
	   printf("%d",s);
	}
	else {
		if (i==0){
			if(strlen(cs)==1){
			printf("%d",s);
			}
			else {
			 continue;
			}
		}
	    else if (i==1){
		   if  (strlen(cs)>2){
			continue ;
			}
		    else {
			 printf("%d",s);
			}
		}
	   else {
		 printf("%d",s);
		}
	}
	 if (i==strlen(cs)-1){
	   printf("\n");
	   printf("%d",ys);
	}
}
return 0;
}


int main ()
{
    char temp[101];
    cin.getline(temp,101);
    if (strlen(temp) == 1) cout << 0 << endl << temp[0];
    else{
        int number[100], remainder;
        for (int i = 0; i < strlen(temp); i++)
            number[i] = temp[i] - 48;
        for (int i = 0; i < strlen(temp) - 1; i++){
            number[i+1] += number[i] % 13 * 10;
            number[i] /= 13;
        }
        remainder = number[strlen(temp) - 1] % 13;
        number[strlen(temp) - 1] /= 13;
        for (int i = 0; i < strlen(temp) - 1; i++){
            if (number[i] == 0 && number[i+1] != 0){
                for (int j = i+1; j < strlen(temp); j++)
                    cout << number[j];
                cout << endl;
                break;
            }
            else if (i == strlen(temp)-2) cout << 0 << endl;
        }
        cout << remainder;
    }
    return 0;
}


/* Name      : ??13
 * Version   : 1.0
 * Date      : 2012-12-16
 * New       : Null
 * Func&Feat : ?????
 * State     : Design
 */
int main()
{
    char c,Dividend[100]={0};
    int N;
    for(int i=0;(c=getchar())!='\n';i++){Dividend[i]=c;N=i+1;}
    int PartQuotient[100]={0},PartRemainder[100]={0};
    if(N==1)cout<<0<<endl<<(int)(Dividend[0]-48)<<endl;
    else
    {
        for(int i=0;i<N;i++)
        {
            int PartDividend;
            if(i==0)PartDividend=Dividend[i]-48;
            else PartDividend=10*PartRemainder[i-1]+(Dividend[i]-48);
            //cout<<i<<' '<<PartDividend<<endl;
            PartQuotient[i]=PartDividend/13;
            PartRemainder[i]=PartDividend%13;
            //cout<<i<<' '<<PartQuotient[i]<<' '<<PartRemainder[i]<<endl;
            if((i<2&&PartQuotient[i]==0&&Dividend[i+1]!=0)==0)cout<<PartQuotient[i];
        }
        cout<<endl<<PartRemainder[N-1]<<endl;
    }
    return 0;
}


int main()
{
	char number[100];
	int i, toDevide, tell = 0;
	cin >> number;
	toDevide = number[0] - '0';
	for(i = 1; number[i] != '\0'; i++)
	{
		toDevide = toDevide * 10 + number[i] - '0';
		if(i > 1 || toDevide / 13 != 0)
	         {
                            cout << toDevide / 13;
                            tell++;
                   }
		toDevide %= 13;
	}
         if ( tell == 0)
              cout << '0';
	cout << endl << toDevide << endl;
	return 0;
}


int l=0;
int shang[100];
char num[100];
int first;
int n;
void count()
{
    if(l==n-1)
    return;
    else if(l!=n-2)
    {
        shang[l]=first/13;
        first=(first-13*shang[l])*10+(num[l+2]-'0');
        l++;
		count();
    }
	else
	{
		shang[l]=first/13;
		first=first-13*shang[l];
		l++;
		count();
	}
}
int main()
{
    cin>>num;
    n=strlen(num);
	if(n==1)
	  cout<<"0"<<endl<<num;
	else if(n==2)
	{
		first=(num[0]-'0')*10+(num[1]-'0');
		if(first<13)
			cout<<"0"<<endl<<num;
		else
			{count();
		if(shang[0]==0)
   {
	   for(int j=1;j<n-1;j++)
		   cout<<shang[j];
   }
   else
	{for(int i=0;i<n-1;i++)
    cout<<shang[i];
   }
    cout<<endl;
    cout<<first;
	}
	}
	else
	{
   { first=(num[0]-'0')*10+(num[1]-'0');
    count();
   if(shang[0]==0)
   {
	   for(int j=1;j<n-1;j++)
		   cout<<shang[j];
   }
   else
	{for(int i=0;i<n-1;i++)
    cout<<shang[i];
   }
    cout<<endl;
    cout<<first;
	}
	}
    return 0;
}


char n[101];
int a[101];
int fig=0,l;
void calculate()
{
	int i,j;
	int yu=0;
	for (i=1;i<l;i++)
	{
		fig=fig*10+((int)n[i]-'0');
		a[i]=fig/13;
		fig=fig-13*a[i];
	}
	for (i=1;i<l;i++)
	{
		if (a[i]!=0)
		{ j=i; break;}
	}
	for (i=j;i<l;i++)
	{
		cout<<a[i];
	}
	cout<<endl; cout<<fig<<endl;
}
int main()
{
	memset(n,'\0',sizeof(n));
	memset(a,0,sizeof(a));
	cin>>n;
	l=strlen(n);
	fig=((int)n[0]-'0');
	if ((l==2&&(fig*10+(int)n[1]-'0')<13)||(l==1))
	{
		cout<<"0"<<endl<<n<<endl;
	}
	else
	{
		calculate();
	}
	return 0;
}


 main()
{
	int num[101]={0},digit,ans[100],left,head,tail,answer_isnt_zero=0;
	for (int i=0;i<100;i++)
		ans[i]=-1;
	char ch[101];
	scanf("%s",ch);
	digit=strlen(ch);
	for (int i=0;i<digit;i++)
		num[i]=(int)ch[i]-48;
	for (int i=0;i<digit;i++){
		ans[i]=num[i]/13;
		num[i+1]+=(num[i]%13)*10;
	}
	for (tail=99;ans[tail]==-1;tail--)
		;
	for (head=0;ans[head]==0;head++)
		;
	for (int i=head;i<=tail;i++){
		printf("%1d",ans[i]);
		answer_isnt_zero=1;
	}
	if (!answer_isnt_zero)
		printf("0");
	printf("\n");
	printf("%d\n",num[digit]/10);
}


int main()
{
	int res[102]={0},chan[102],len,i,j,n,k;
	char c[102];
	cin.getline(c,101);
	len=strlen(c);
	for(i=0;i<len;i++)
	{
		chan[i]=c[i]-'0';
	}
	for(i=1;i<len;i++)
	{
		chan[i]+=10*chan[i-1];
		if(chan[i]>=13)
		{
			res[i]=chan[i]/13;
			chan[i]=chan[i]%13;
		}
	}
	i=0;
	while(res[i]==0) i++;
		if(len-i>=1)
	{
			for(;i<len;i++)
	{
		cout<<res[i];
	}
	}
	else cout<<'0';
	cout<<endl<<chan[len-1];
	return 0;
}


main()
{
      char z[NUM]={'\0'};
      char y[NUM]={'\0'};
      int count=0,i=0,shu=0,j;
      scanf("%s",z);
      for(;;count++)/*???????*/
      {     if(z[count]=='\0') break;
            i=shu*10+(z[count]-'0');/*i=the two number*/
            shu=i%13;
            j=i/13;
            y[count]=j+'0';
      }
      count=0;
      j=0;
      for(;y[count]!='\0';count++)
      {
            if(j==0)
               {
                    if(y[count]=='0')
                       continue;
                    else
                       {
                                j=1;
                                printf("%c",y[count]);
                                continue;
                       }
               }
            printf("%c",y[count]);
      }
     if(j==0)
     printf("%c",y[0]);
      printf("\n%d",shu);

}


int ans[110];
int num[110];
int sig=0;
void devide(int a, int b,int tag)
{
	ans[sig]=(num[a]*10+num[b])/13;
	num[b]=(num[a]*10+num[b])%13;
	sig++;
	if(b==tag-1)
	{
		if(sig==1)cout<<ans[0]<<endl;
		else{
		int flag=0;
		for(int i = 0 ; i < sig ; i++)
		{
			if(ans[i]!=0)flag=1;
			if(i!=sig-1 && flag!=0 )cout<<ans[i];
			else if(i==sig-1 && flag!=0) cout<<ans[i]<<endl;
		}
		}
		cout<<num[b]<<endl;
		return;
	}
	else devide(b,b+1,tag);
}
int main()
{
	int tag=0;
	char str[110];
	char x;
	x=getchar();
	while(x!='\n' && x!=' ')
	{
		str[tag]=x;
		tag++;
		x=getchar();
	}
	for(int i = 0 ; i < tag ; i++)num[i]=str[i]-'0';
	if(tag==1)
	{
		cout<<"0"<<endl;
		cout<<num[0]<<endl;
	}
	else devide(0,1,tag);
	return 0;
}


int main()
{
	char sz[101];
	gets(sz);
	int n,yushu=0,shang,m;
	n=strlen(sz);
	for(int i=0;i<n;i++)
	{
		m=yushu*10+ (sz[i]-'0');
		shang=m/13;
		yushu=m%13;
		if(n>2&& i<2&& shang==0)
		{
			printf("");
		}
		else if(n==2 && i==0)
		{
			printf("");
		}
		else
		{
			printf("%d",shang);
		}
	}
	printf("\n%d",yushu);
}


int main()
{
	char dividend[100], quotient[100];
	int remainder, i;
	cin >> dividend;
	remainder = dividend[0] - '0';
	quotient[0] = '0';
	quotient[1] = '\0';
	for (i = 1; dividend[i] != '\0'; i++)
	{
		quotient[i - 1] = (remainder * 10 + (int)(dividend[i] - '0')) / 13 + '0';
		remainder = (remainder * 10 + (int)(dividend[i] - '0')) % 13;
	}
	if (quotient[1] != '\0')
	    quotient[i - 1] = '\0';
	if (quotient[0] == '0' && quotient[1] != '\0')
		cout << quotient + 1 << endl;
	else
		cout << quotient << endl;
	cout << remainder;
	return 0;
}


int main ()
{
	char str[100];
	int lenS, i, answer[100], devided[100];
	int left;
	while ( cin >> str )
	{
		lenS = strlen(str);
		if ( lenS == 1 )
		{
			cout << 0 << endl;
			cout << str[0] << endl;
		}
		else if ( lenS == 2 && str[0] == '1' && str[1] < '3' )
		{
			cout << 0 << endl;
			cout << str[0] << str[1] << endl;
		}
		else
		{
			for ( i = 0; i < lenS; i ++ )
				devided[i] = str[i] - '0';
			if ( str[0] == '1' && str[1] < '3' )
			{
				answer[0] = ( devided[0] * 100 + devided[1] * 10 + devided[2] ) / 13;
				left = ( devided[0] * 100 + devided[1] * 10 + devided[2] ) % 13;
				cout << answer[0];
				for ( i = 1; i < lenS - 2; i ++ )
				{
					answer[i] = ( left * 10 + devided[i+2] ) / 13;
					left = ( left * 10 + devided[i+2] ) % 13;
					cout << answer[i];
				}
				cout << endl;
				cout << left << endl;
			}
			else
			{
				left = devided[0];
				for ( i = 0; i < lenS - 1; i ++ )
				{
					answer[i] = ( left * 10 + devided[i+1] ) / 13;
					left = ( left * 10 + devided[i+1] ) % 13;
				}
				if ( answer[0] != 0 )
					cout << answer[0];
				for ( i = 1; i < lenS - 1; i ++ )
					cout << answer[i];
				cout << endl;
				cout << left << endl;
			}
		}
	}
	return 0;
}


int main()
{
	char str[101];
	int num[101],i,temp,result[101];
	cin>>str;

	for(i=0;i<101;i++)
		result[i]=num[i]=-1;
	for(i=0;str[i]!=0;i++)
		num[i]=str[i]-'0';
	i=0;
	temp=0;
	while(num[i]!=-1)
	{
		temp=temp*10+num[i];
		result[i]=temp/13;
		temp=temp%13;
		i++;
	}
	for(i=0;result[i]==0;i++);
	if(result[i]==-1) cout<<0;
	else
	{
		for(;result[i]!=-1;i++)
			cout<<result[i];
	}
	cout<<endl<<temp;
	return 0;
}


int step=0,length=0,a=0;
int sang[101]={0};
void buqi(int num1[101],int num2[101])
{
	int i;
	num2[0]=1;
	num2[1]=3;
	num2[2]=0;
	if(num1[0]>num2[0]||(num1[0]==num2[0]&&num1[1]>=num2[1])) i=1;
	else
	{
		a++;
		num2[0]=0;
		num2[1]=1;
		num2[2]=3;
		//cout<<a<<endl;
	}
}
void qingling(int num3[101],int num6[101])
{
	int i,j;
	for(i=0;i<length;i++)
	{
		if(num3[i]!=0)
			break;
	}
	for(j=0;j<length-i;j++)
		num3[j]=num3[j+i];
	for(j=length-i;j<length;j++)
		num3[j]=0;
	length=length-i;
	//cout<<length<<endl;
	if(num6[0]!=0)
		a=a+i-1;
	else a=a+i-2;
	//cout<<a<<endl;
}
void jianfa(int num4[101],int num5[101],int i)
{
	int j;
	while(true)
	{
		for(j=i-1;j>=0;j--)
		{
			if(num4[j]>=num5[j])
			{
				num4[j]=num4[j]-num5[j];
				//cout<<num4[j]<<" ";
			}
			else
			{
				num4[j-1]=num4[j-1]-1;
				num4[j]=num4[j]+10;
				num4[j]=num4[j]-num5[j];
				//cout<<num4[j]<<" ";
			}
		}
		//cout<<endl;
		if(num5[0]==1)
		{
			if(num4[0]>num5[0]||(num4[0]==num5[0]&&num4[1]>=num5[1])) j=j;
			else break;
		}
		else
		{
			if(num4[0]>num5[0]||num4[1]>num5[1]||(num4[1]==num5[1]&&num4[2]>=num5[2])) j=j;
			else break;
		}

		step++;
	}
}
int main()
{
	char str1[101]={'\0'};
	int num1[101]={0},num2[101]={0};
	int i,weishu,biaoji=0,j;
	cin>>str1;
	length=strlen(str1);
	weishu=length;
	for(i=0;i<length;i++)
	{
		num1[i]=str1[i]-'0';
	}
	while(true)
	{
		step=0;
		if(length==1)
			break;
		buqi(num1,num2);
		if(length==2&&num2[0]==0)
		{
			num1[0]=num1[0]*10+num1[1];
			sang[a]=0;
			break;
		}
		else
		{
			jianfa(num1,num2,length);
			biaoji=0;
			for(i=0;i<weishu;i++)
			{
				if(num1[i]!=0)
				{
					biaoji=1;
					break;
				}
			}
			sang[a]=step+1;
			//cout<<a<<" "<<sang[a]<<" "<<endl;
			if(biaoji==1)
			{
				qingling(num1,num2);
			}
			else break;
		}
		a++;
	}
	if(weishu>1)
	{
		for(i=0;i<weishu-1;i++)
		{
			if(sang[i]!=0)
				break;
		}
		if(i==weishu-1)
			cout<<sang[0];
		else
		{
			for(j=i;j<weishu-1;j++)
				cout<<sang[j];
		}
	}
	else cout<<sang[0];
	cout<<endl;
	cout<<num1[0]<<endl;
		return 0;
}


int main()
{
        int l,i,j,tem,carry;
        char input[110];
        int in[110],out[110];
        scanf("%s",input);
        l=strlen(input);
        for(i=0;i<l;i++)
                in[i]=input[i]-'0';
        carry=in[0];
if(l==1){printf("0\n%d",in[0]);return 0;}
        for(i=1;i<l;i++)
        {
                tem=10*carry+in[i];
                out[i-1]=tem/13;
                carry=tem%13;
        }
        if(out[0]!=0)
        {
                printf("%d",out[0]);
                for(i=1;i<l-1;i++)
                  printf("%d",out[i]);
                printf("\n");
        }
        else if((out[0]==1||out[0]==0)&&l-1<2) printf("%d\n",out[0]);
        else if(out[0]==0&&l-1>1)
        {
                for(i=1;i<l-1;i++)
                        printf("%d",out[i]);
                printf("\n");
        }

        printf("%d",carry);
        return 0;
}


int main()
{
	char integral[120],divide[120];
	int mod;
	int i;
	int int1,int2;
	int len,lendivide;
	scanf("%s",integral);
	len=strlen(integral);
	int1=(int)(integral[0]-'0');
	int2=(int)(integral[1]-'0');
	if (len==1)
	{
		printf("0\n");
		printf("%d\n",int1);
	}
	if (len==2 && int1*10+int2<13)
	{
		printf("0\n");
		printf("%d\n",int1*10+int2);
	}
	if ((len==2 && int1*10+int2>=13) ||(len>2))
	{
	lendivide=((int1*10+int2)<13)? len-2:len-1;
	if (lendivide==len-1)
	{
		for (i=0;i<lendivide;i++)
		{
			if (i==0)
			{
				divide[i]=(char)(((int)(integral[i]-'0')*10+(int)(integral[i+1]-'0'))/13+48);
				mod=((int)(integral[i]-'0')*10+(int)(integral[i+1]-'0'))%13;
			}
			else
			{
				divide[i]=(char)((mod*10+(int)(integral[i+1]-'0'))/13+48);
				mod=(mod*10+(int)(integral[i+1]-'0'))%13;
			}
		}
	}
	if (lendivide==len-2 && lendivide!=0)
	{
		for (i=0;i<lendivide;i++)
		{
			if (i==0)
			{
				divide[i]=(char)(((int)(integral[i]-'0')*100+(int)(integral[i+1]-'0')*10+(int)(integral[i+2]-'0'))/13+48);
				mod=((int)(integral[i]-'0')*100+(int)(integral[i+1]-'0')*10+(int)(integral[i+2]-'0'))%13;
			}
			else
			{
				divide[i]=(char)((mod*10+(int)(integral[i+2]-'0'))/13+48);
				mod=(mod*10+(int)(integral[i+2]-'0'))%13;
			}
		}
	}
	divide[lendivide]='\0';
	printf("%s\n",divide);
	printf("%d\n",mod);
	}
	return 0;
}


int main()
{
	int i_shu[100] = {0}, shang[100] = {0};
	int i, len, yu = 0, k = 0;
	char c_shu[100];
	gets(c_shu);
	len = strlen(c_shu);

	for (i = 0; i < len; i++)
		i_shu[i] = c_shu[i] - '0';

	for (i = 0; i < len; i++)
	{
		yu = yu * 10 + i_shu[i];
		shang[i] = yu / 13;
		yu = yu % 13;
	}

	if (len <= 2)
		cout << shang[1];
	else
	{
		for (i = 0; shang[i] == 0; i++)
			k++;
		for (i = k; i < len; i++)
			cout << shang[i];
	}
	cout << endl << yu << endl;
	return 0;
}


int main()
{
	char dividend[100], result[100];
	int i, remainder, len, temDivid, flag = 0;
	cin >> dividend;
	len = strlen(dividend);
	for (i = 0, temDivid = dividend[0] - '0'; i < len - 1; i++)
	{
		result[i] = temDivid / DIVISOR + '0';
		remainder = temDivid % DIVISOR;
		temDivid = remainder * 10 + (dividend[i + 1] - '0');
	}
	result[i] = temDivid / DIVISOR + '0'; // ????i = len????dividend[i + 1]??????len=1??????
	remainder = temDivid % DIVISOR;
	result[i + 1] = '\0';
	for (i = 0; result[i] == '0';)
		i++;
	if (result[i] == '\0')
		cout << 0 << endl << remainder << endl;
	else
		cout << result + i << endl << remainder << endl;
	return 0;
}


int main()
{
	int i,j,k;
	int shuzu[101],shang[101]={0};
	int fenjie;
	char chuan[101];//?????
	cin>>chuan;//?????
	int length=strlen(chuan);//??????

	for(i=0;i<length;i++)shuzu[i]=chuan[i]-'0';//???????

	if(length==1)
    {
		      cout<<"0"<<endl<<shuzu[0]<<endl;
	}//?????

	else
    {
            	fenjie=shuzu[0]*10+shuzu[1];
            	shuzu[1]=fenjie%13;
            	if(length==2 && fenjie<13)
                {
                             cout<<"0"<<endl;
                             cout<<fenjie;
                }//??13??????
            	else
                {
                    if(fenjie>=13)
                    shang[0]=fenjie/13;//????
                	for(i=1;i<length-1;i++)
                    {
                		fenjie=shuzu[i]*10+shuzu[i+1];
                		shuzu[i+1]=fenjie%13;
                		shang[i]=fenjie/13;
                	}
                	if(shang[0]!=0)cout<<shang[0];
                	for(i=1;i<length-1;i++)cout<<shang[i];
                    cout<<endl;
                    cout<<shuzu[i];
                 }//????
    }
	return 0;
}


int main()
{
	int i,len,temp;
	char str1[MAXLEN],str2[MAXLEN];

	cin >> str1;
	len=strlen(str1);

	temp=0;
	for (i=0;i<len;i++)
	{
		temp=(temp%13)*10+str1[i]-'0';
		str2[i]='0'+temp/13;
	}

	for (i=0;i<len;i++)
		if ( str2[i]!='0' )
			break;
	if (i==len)
		cout << "0" << endl;
	else
	{
		for (;i<len;i++)
			cout << str2[i];
		cout << endl;
	}
	cout << temp%13 << endl;
	return 0;
}


int main ()
{
    char beichushu[101],shang[100];
    const int chushu=13;
    int a,b,i,c,d;
    gets (beichushu);
    a=strlen (beichushu);
if (a==1) printf ("0\n%s",beichushu);
else if (a==2) {c=((beichushu[0]-'0')*10+beichushu[1]-'0')/chushu;
                      d=((beichushu[0]-'0')*10+beichushu[1]-'0')%chushu;
                      printf("%d\n%d",c,d);}
else
{
    b=(beichushu[0]-'0')*10+(beichushu[1]-'0');
    if (b<13)
    {
            for (i=0;i<=a-3;i++)
            {
                b=b*10+beichushu[i+2]-'0';
                shang[i]=b/chushu+'0';
                b=b%chushu;
            }

            shang[a-2]='\0';
            printf ("%s\n%d",shang,b);
     }
     else
     {
         for (i=0;i<=a-3;i++)
         {
             shang[i]=b/chushu+'0';
             b=b%chushu;
             b=b*10+beichushu[i+2]-'0';
         }
         shang[a-2]=b/chushu+'0';
         b=b%chushu;
         shang[a-1]='\0';
         printf ("%s\n%d",shang,b);
     }
}
return 0;
}


int main()
{
    char test[100] , tem[100];
    int len , i , j , flag = 0;
    int q , r = 0;
    while(cin >> test)
    {
        len = strlen(test);
        for (i = 0 ; i <= len - 1 ; i++)
        {
           r =10 * r + test[i] - '0';
           if (((r / 13) != 0)&&(!flag))
           {
               q = i;
               flag = 1;
           }
           if (flag)
           {
               tem[i - q] = r / 13 + '0';
           }
           r = r % 13;
        }
        if (flag == 0)
        {
            cout << '0';
        }
        else
        {
            for (i = 0 ; i <= len - 1 - q ; i++)
           {
             cout << tem[i];
           }
        }
        cout << endl;
        cout << r << endl;
    }
    return 0;
}


char beichushu[150];
int beichu[150];               //???????
int chu[150];                  //???????????
int chu1[250];                 //???????????
int shang[200];               //?????
void subtract(int *,int *);      //???????????????
int compare(int *,int *);        //????????
int wei(int *);                  //??????
void fangda(int *, int);         //?????10?n???
int main(void)
{
	int i,j,k;
	int n;
	int max;

		int x=0;
		int m=0;
		scanf("%s",beichushu);
		memset(beichu,0,sizeof(beichu));
		memset(chu,0,sizeof(chu));
		memset(chu1,0,sizeof(chu1));
		memset(shang,0,sizeof(shang));

		for(i=strlen(beichushu)-1,j=0;i>=0;i--)
			beichu[j++]=beichushu[i]-'0';
        chu[0]=3;
        chu[1]=1;
        chu1[0]=3;
        chu1[1]=1;
		k=wei(beichu)-wei(chu);            //k????????????
		max=k;                             //?????????????max???????????
		int a=compare(beichu,chu);         //????????????0
		fangda(chu1,k);                    //????
		while(compare(beichu,chu))
		{
			while(compare(beichu,chu1))
			{
				subtract(beichu,chu1);
				m++;
			}
			shang[x]=m;
			x++;
			m=0;
			memset(chu1,0,sizeof(chu1));
		    chu1[0]=3;
		    chu1[1]=1;
			k--;
			if(k>=1)
			    fangda(chu1,k);
		}
		if(shang[0]==0)
		{
			for(i=1;i<=max;i++)
			{
			    printf("%d",shang[i]);
			}
		}
		else if(shang[0]>0)
		{
			for(i=0;i<=max;i++)
			    printf("%d",shang[i]);
		}
		if(a==0)
		    printf("0");
		printf("\n");
		if(beichu[1]==1)
		for(i=1;i>=0;i--)
		    printf("%d",beichu[i]);
		else
		    printf("%d",beichu[0]);
	return 0;
}

void subtract(int *beichu,int *chu1)
{
	int i;
	for(i=0;i<120;i++)
	{
		beichu[i]=beichu[i]-chu1[i];
		if(beichu[i]<0)
		{
			beichu[i]+=10;
			beichu[i+1]--;
		}
	}
}
int compare(int *beichu,int *chu1)
{
	if(wei(beichu)>wei(chu1))
	    return 1;
	else if(wei(beichu)<wei(chu1))
	    return 0;
	else
	{
		int i;
		for(i=149;;i--)
		{
			if(beichu[i]>chu1[i])
			    return 1;
			else if(beichu[i]<chu1[i])
			    return 0;
		}
	}
	return 1;
}
int wei(int *a)
{
	int i,post;
	for(i=149;i>=0;i--)
	{
		if(a[i]>0)
		{
			post=i+1;
				return post;
		}
	}
}
void fangda(int *c,int n)
{
	int i;
	for(i=100;i>=0;i--)
	{
		c[i+n]=c[i];
	}
	for(i=0;i<n;i++)
	{
		c[i]=0;
	}
}


main(){
	int a[100],b[100];
	int blength,i,alength,sum,zero,test;
	char s[100];
	scanf("%s",s);
	alength=strlen(s);
	blength=0;
	zero=0;
	test=0;
	for(i=1;i<=alength;i++){
		a[i-1]=s[i-1]-'0';
	}
	for(i=alength;i>=1;i--){
		if(a[i-1]==0){
			zero++;
		}
		else{
			break;
		}
	}

	for(i=1;i<=alength-1;i++){
		sum=a[i-1]*10+a[i];

		if(sum>=13){
			a[i]=sum%13;
			b[blength]=(sum-a[i])/13;
			blength++;//100?ÄÇé¿ö
			if(i==(alength-1-zero)){
				test=1;
				break;
			}
		}
		else{

			a[i]+=a[i-1]*10;
			if(alength<=2&&sum<13){
				blength=1;
				b[0]=0;
				break;
			}
			if(blength!=0){
				b[blength]=0;
				blength++;
			}
		}
	}
	if(alength==1){
		blength=1;
		b[0]=0;
	}
	for(i=1;i<=blength;i++){
		printf("%d",b[i-1]);

	}
	if(zero!=0&&test==1){
		for(i=1;i<=zero;i++){
			printf("0");
		}
	}
	printf("\n%d",a[alength-1]);
}


int main()
{
	int n,a,b,c,d,e,f;
	cin>>n;
	cout<<n/100<<endl;n=n%100;
	cout<<n/50<<endl;n=n%50;
	cout<<n/20<<endl;n=n%20;
	cout<<n/10<<endl;n=n%10;
	cout<<n/5<<endl;n=n%5;
	cout<<n<<endl;
	return 0;
}


void main()
{
int i=0,j=0,pieces[10],result[10];
float value,flag[10],mianzhi[10]={100,50,20,10,5,1};
scanf("%f",&value);
while(value>=mianzhi[i],i<10)
{
pieces[i]=value/mianzhi[i];
value=value-pieces[i]*mianzhi[i];
i++;
}
for(i=0;i<10;i++)
{
if(pieces[i]>=0)
{
result[j]=pieces[i];
flag[j]=mianzhi[i];
j++;
}
}
for(i=0;i<j;i++)
{
printf("%d\n",result[i]);
}
}


int v;
void fy(int s)
{
     cout<<v/s<<endl;
     v=v%s;
}
int main()
{
    int a,b,c=0,d[4]={0};
    double m,n=0,r;
    char s[100];
    cin>>v;
    fy(100);
    fy(50);
    fy(20);
    fy(10);
    fy(5);
    fy(1);
    return EXIT_SUCCESS;
}


int main()
{
	int a;
	int bai,wushi,ershi,shi,wu,yi;
	cin>>a;
	bai=a/100;
	a=a%100;
	wushi=a/50;
	a=a%50;
	ershi=a/20;
	a=a%20;
	shi=a/10;
	a=a%10;
	wu=a/5;
	a=a%5;
	yi=a;
	cout<<bai<<endl;
	cout<<wushi<<endl;
	cout<<ershi<<endl;
	cout<<shi<<endl;
	cout<<wu<<endl;
	cout<<yi<<endl;
	return 0;
}


int main()
{
	int money,change[6]={0},i,mon[6]={100,50,20,10,5,1},p;
	cin>>money;
	for(i=0;i<6;i++)
	{
		p=money;
		change[i]=money/mon[i];
		money=p-change[i]*mon[i];
	}
	for(i=0;i<6;i++)
	{
		cout<<change[i]<<endl;
	}
	return 0;
}


int main()
{
	int sum,number[6]={0},i,j=0;
	cin>>sum;
	for (;sum>=100;number[j]++)		sum=sum-100;
	j++;
	for (;sum>=50;number[j]++) sum=sum-50;
	j++;
	for (;sum>=20;number[j]++)sum=sum-20;
	j++;
	for (;sum>=10;number[j]++)sum=sum-10;
	j++;
	for (;sum>=5;number[j]++)sum=sum-5;
	j++;
	for (;sum>=1;number[j]++)sum=sum-1;
	for(j=0;j<6;j++) cout<<number[j]<<endl;
	return 0;
}


int main()
{
	int n,h,l;
	cin>>n;
	h=n/100;
	l=n%100;
	cout<<h<<endl;
	h=l/50;
	l=l%50;
	cout<<h<<endl;
    h=l/20;
	l=l%20;
	cout<<h<<endl;
	h=l/10;
	l=l%10;
	cout<<h<<endl;
	h=l/5;
	l=l%5;
	cout<<h<<endl;
	h=l/1;
	l=l%1;
	cout<<h<<endl;
    return 0;
}


int main()
{
	int sum,i,n[6],rest[7],
		price[6]={100,50,20,10,5,1};
	cin>>sum;
	rest[0]=sum;
	for(i=0;i<6;i++)
	{
		n[i]=rest[i]/price[i];
		rest[i+1]=rest[i]%price[i];
		cout<<n[i]<<endl;
	}
    return 0;
}


int main()
{
	int sum;
	cin>>sum;
	cout<<sum/100<<endl;
	sum=sum-(sum/100)*100;
	cout<<sum/50<<endl;
	sum=sum-(sum/50)*50;
	cout<<sum/20<<endl;
	sum=sum-(sum/20)*20;
	cout<<sum/10<<endl;
	sum=sum-(sum/10)*10;
        cout<<sum/5<<endl;
	sum=sum-(sum/5)*5;
	cout<<sum;

	return 0;
}


int main()
{
	int	N;
	cin >> N;

	int	piao100 = 0;
	int	piao50 = 0;
	int	piao20 = 0;
	int	piao10 = 0;
	int	piao5 = 0;
	int	piao1 = 0;

	piao100 = (int) (N / 100);
	N = N - 100 * piao100;

	piao50 = (int)	(N / 50);
	N = N - 50 * piao50;

	piao20 = (int) (N / 20);
	N = N - 20 * piao20;

	piao10 = (int) (N / 10);
	N = N - 10 * piao10;

	piao5 = (int) (N / 5);
	N = N - 5 * piao5;

	piao1 = N;

	cout << piao100 << endl << piao50 << endl << piao20 << endl << piao10 << endl;
	cout << piao5 << endl << piao1 << endl;

return 0;
}


int main()
{
	double m;
	int a,b,c,d,e,f;
	cin>>m;
	a=(int)(m/100);
	m=m-100*a;
	b=(int)(m/50);
	m=m-50*b;
	c=(int)(m/20);
	m=m-20*c;
	d=(int)(m/10);
	m=m-10*d;
	e=(int)(m/5);
	m=m-5*e;
	f=m;
	cout<<a<<endl;
	cout<<b<<endl;
cout<<c<<endl;
cout<<d<<endl;
cout<<e<<endl;
cout<<f<<endl;
return 0;
}


int main()
{
int x;
cin>>x;
int x100=x/100;
cout<<x100<<endl;
x=x%100;
int x50=x/50;
cout<<x50<<endl;
x=x%50;
int x20=x/20;
cout<<x20<<endl;
x=x%20;
int x10=x/10;
cout<<x10<<endl;
x=x%10;
int x5=x/5;
cout<<x5<<endl;
x=x%5;
cout<<x<<endl;
return 0;
}


int main()
{
	int num,j,i,an[6]={100,50,20,10,5,1};
	cin>>num;
	cout<<num/an[0]<<endl;
	for(i=1;i<6;i++)
	{
	num=num-num/an[i-1]*an[i-1];
	cout<<num/an[i]<<endl;
	}
	return 0;
}


int main()
{
int sum;
scanf("%d",&sum);
int i=0;
while(sum>=100)
{
i++;
sum=sum-100;
}
printf("%d\n",i);
i=0;
while(sum>=50)
{
i++;
sum=sum-50;
}
printf("%d\n",i);
i=0;
while(sum>=20)
{
i++;
sum=sum-20;
}
printf("%d\n",i);
i=0;
while(sum>=10)
{
i++;
sum=sum-10;
}
printf("%d\n",i);
i=0;
while(sum>=5)
{
i++;
sum=sum-5;
}
printf("%d\n",i);
i=0;
while(sum>=1)
{
i++;
sum=sum-1;
}
printf("%d\n",i);
}


int main()
{
	int money;
	int i;
	int num[6] = { 0 };
	int mon[6] = { 100,50,20,10,5,1};

	cin >> money;
	for( i = 0; i < 6; i ++)
	{
		num[i] = money / mon[i];
		money = money % mon[i];

	}
	for( i = 0; i < 6; i ++)
          cout << num [i] << endl;
	return 0;
}


int main()
{
	int money,yuan100,yuan50,yuan20,yuan10,yuan5,yuan1;
	scanf("%d",&money);
	if(money<0)
		printf("Error!\n");
	else
	{
		yuan100=(money-(money%100))/100;
	    money=money-yuan100*100;
	    yuan50=(money-(money%50))/50;
	    money=money-yuan50*50;
	    yuan20=(money-(money%20))/20;
	    money=money-yuan20*20;
	    yuan10=(money-(money%10))/10;
	    money=money-yuan10*10;
	    yuan5=(money-(money%5))/5;
	    money=money-yuan5*5;
	    yuan1=money;

		    printf("%d\n",yuan100);

		    printf("%d\n",yuan50);

		    printf("%d\n",yuan20);

		    printf("%d\n",yuan10);

		    printf("%d\n",yuan5);
	    printf("%d\n",yuan1);
	}
	return 0;
}


int main(int argc, char* argv[])
{
	int data[6]={100,50,20,10,5,1};
	int num[6]={0};
	int sum,i;
	scanf("%d",&sum);
	for(i=0;i<6;i++){
		for(;;){
			if(sum-data[i]>=0){
				sum=sum-data[i];
		        num[i]++;
			}
			else break;
		}

	    printf("%d\n",num[i]);
	}

    return 0;
}


int main()
{
    int a,n,c[100],i,j = 0,sum = 0,q;
	cin >> a;
	while (1)
	{
		sum = sum + 100;
		j++;
		if(sum > a)
		{
			j--;
			sum = sum - 100;
			break;
		}
	}
	cout << j<<endl;
	j = 0;
while (1)
	{
		sum = sum + 50;
		j++;
		if(sum > a)
		{
			j--;
			sum = sum - 50;
			break;
		}
	}
cout << j<<endl;
	j = 0;
	while (1)
	{
		sum = sum + 20;
		j++;
		if(sum > a)
		{
			j--;
			sum = sum - 20;
			break;
		}
	}
cout << j<<endl;
	j = 0;
	while (1)
	{
		sum = sum + 10;
		j++;
		if(sum > a)
		{
			j--;
			sum = sum - 10;
			break;
		}
	}
cout << j<<endl;
	j = 0;
	while (1)
	{
		sum = sum + 5;
		j++;
		if(sum > a)
		{
			j--;
			sum = sum - 5;
			break;
		}
	}
cout << j<<endl;
	j = 0;
	while (1)
	{
		sum = sum + 1;
		j++;
		if(sum > a)
		{
			j--;
			sum = sum - 1;
			break;
		}
	}
cout << j<<endl;
    return 0;
}


main(){
	int n,i,money;
	scanf("%d",&n);
	money=n;

	for(i=0;money>0;i++){
		money-=100;
	}
	if(money<0){
		money+=100;
		i--;
	}
	printf("%d\n",i);

	for(i=0;money>0;i++){
		money-=50;
	}
	if(money<0){
		money+=50;
		i--;
	}
	printf("%d\n",i);

	for(i=0;money>0;i++){
		money-=20;
	}
	if(money<0){
		money+=20;
		i--;
	}
	printf("%d\n",i);

	for(i=0;money>0;i++){
		money-=10;
	}
	if(money<0){
		money+=10;
		i--;
	}
	printf("%d\n",i);

	for(i=0;money>0;i++){
		money-=5;
	}
	if(money<0){
		money+=5;
		i--;
	}
	printf("%d\n",i);
	printf("%d\n",money);
	return 0;
}


int main()
{
    int i,er=0,ws=0,sh=0,wu=0,b=0,money;
    cin>>money;
    for(;;)
    {if(money/100>=1) {money=money-100;b=b+1;}
    else break;}//?????100???
    for(;;)
    {if(money/50>=1) {money=money-50;ws=ws+1;}
    else break;}//?????50???
    for(;;)
    {if(money/20>=1) {money=money-20;er=er+1;}
    else break;}
    for(;;)
    {if(money/10>=1) {money=money-10;sh=sh+1;}
    else break;}
    for(;;)
    {if(money/5>=1) {money=money-5;wu=wu+1;}
    else break;}
    cout<<b<<endl<<ws<<endl<<er<<endl<<sh<<endl<<wu<<endl<<money<<endl;
    return 0;
}


int main()
{
int sum;
scanf("%d",&sum);
printf("%d\n",sum/100);
sum=sum-sum/100*100;
if(sum>=50)
{
printf("1\n");
sum=sum-50;
}
else
printf("0\n");
printf("%d\n",sum/20);
sum=sum-sum/20*20;
printf("%d\n",sum/10);
sum=sum-sum/10*10;
printf("%d\n",sum/5);
sum=sum-sum/5*5;
printf("%d\n",sum);
return 0;
}


int main()
{
	int input,hundred,fifty,twenty,ten,five;
	cin>>input;
	hundred=(input-input%100)/100;
	input=input-hundred*100;
	fifty=(input-input%50)/50;
	input=input-fifty*50;
	twenty=(input-input%20)/20;
	input=input-twenty*20;
	ten=(input-input%10)/10;
	input=input-ten*10;
	five=(input-input%5)/5;
	input=input-five*5;
	cout<<hundred<<endl<<fifty<<endl<<twenty<<endl<<ten<<endl<<five<<endl<<input<<endl;
	return 0;}


int main()
{
	int money,bz[6]={100,50,20,10,5,1},y,i,num[6];
	cin>>money;
	y=money;
	for(i=0;i<6;i++)
	{
		if(y<bz[i])
		{
			num[i]=0;
			continue;
		}
		else
		{
            num[i]=(y/bz[i]);
			y=y%bz[i];
		}
	}
	for(i=0;i<6;i++)
	{
		cout<<num[i]<<endl;
	}
	return 0;
}


int main( int argc, char* argv[] ){
	int money = 0;
	int amount = 0;
	int value = 0, i, unit[max] = {0};

	unit[0] = 100;
	unit[1] = 50;
	unit[2] = 20;
	unit[3] = 10;
	unit[4] = 5;
	unit[5] = 1;

	scanf( "%d", &money );

	for ( i = 0; i < max; i++ ){
		value = money / unit[i];
		printf( "%d\n", value );
		money = money - value * unit[i];
	}

	return 0;
}


int main()
{
    int deno[6] = {100,50,20,10,5,1};
    int money;
    scanf("%d",&money);
    int count[6];
    for (int i=0;i<6;++i) count[i] = 0;
    while (money!=0)
    {
        for (int i=0;i<6;++i)
        {
            if (money>=deno[i])
            {
                money -= deno[i];
                count[i]++;
                break;
            }
        }
    }
    for (int i=0;i<6;++i)
    {
        printf("%d\n",count[i]);
    }
    return 0;
}


int main()
{
    int n,l;
    scanf("%d",&n);
    int a;
    a=(int)n/100;
    printf("%d\n",a);
    l=n-a*100;
    int b;
    b=(int)l/50;
    printf("%d\n",b);
    l=l-b*50;
    int c;
    c=(int)l/20;
    printf("%d\n",c);
    l=l-c*20;
    int d;
    d=(int)l/10;
    printf("%d\n",d);
    l=l-d*10;
    int e;
    e=(int)l/5;
    printf("%d\n",e);
    l=l-5*e;
    int f;
    f=(int)l/1;
    printf("%d\n",f);
    return 0;
}


int main()
{
	int x,a,i;
	scanf("%d",&x);
	for(i=0;i<6;i++)
	{
		switch(i)
		{
		case 0:
			a=x/100;
			x=x%100;
			printf("%d\n",a);
			break;
		case 1:
			a=x/50;
			x=x%50;
			printf("%d\n",a);
			break;
		case 2:
			a=x/20;
			x=x%20;
			printf("%d\n",a);
			break;
	    case 3:
			a=x/10;
			x=x%10;
			printf("%d\n",a);
			break;
		case 4:
			a=x/5;
			x=x%5;
			printf("%d\n",a);
			break;
		default:
			{a=x/1;
			x=x%1;
			printf("%d\n",a);
			break;}
		}
	}
	return 0;
}


int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	int num1=n/100;printf("%d\n",num1);
	n-=num1*100;
    int num2=n/50;printf("%d\n",num2);
	n-=num2*50;
	int num3=n/20;printf("%d\n",num3);
	n-=num3*20;
	int num4=n/10;printf("%d\n",num4);
	n-=num4*10;
	int num5=n/5;printf("%d\n",num5);
	n-=num5*5;
	int num6=n;printf("%d\n",num6);

	return 0;
}


int main()
{
	int money,num100,num50,num20,num10,num5,num1;
	cin>>money;
	if(money/100>0)
	{
		num100=money/100;
		money=money-100*num100;
		cout<<num100<<endl;
	}
	else
		cout<<"0"<<endl;
    if(money/50>0)
	{
		num50=money/50;
		money=money-50*num50;
		cout<<num50<<endl;
	}
    else
		cout<<"0"<<endl;

    if(money/20>0)
	{
		num20=money/20;
		money=money-20*num20;
		cout<<num20<<endl;
	}
    else
		cout<<"0"<<endl;
    if(money/10>0)
	{
		num10=money/10;
		money=money-10*num10;
		cout<<num10<<endl;
	}
    else
		cout<<"0"<<endl;
    if(money/5>0)
	{
		num5=money/5;
		money=money-5*num5;
		cout<<num5<<endl;
	}
    else
		cout<<"0"<<endl;
	cout<<money;
	return 0;
}


int main()
{
	int a[6]={0};
    int money,i;
	scanf("%d",&money);
	if((money-100)>=0)
	{
		a[0]=(money-money%100)/100;
		money=money%100;
	}else{money=money;}
    if((money-50)>=0)
	{
		a[1]=(money-money%50)/50;
		money=money%50;
	}else{money=money;}
	if((money-20)>=0)
	{
		a[2]=(money-money%20)/20;
		money=money%20;
	}else{money=money;}
	if((money-10)>=0)
	{
		a[3]=(money-money%10)/10;
		money=money%10;
	}else{money=money;}
	if((money-5)>=0)
	{
		a[4]=(money-money%5)/5;
		money=money%5;
	}else{money=money;}
    a[5]=money;
	for(i=0;i<=5;i++)
		printf("%d\n",a[i]);
	return 0;
}


int main()
{
  int yibai=0;
  int wushi=0;
  int ershi=0;
  int shi=0;
  int wu=0;
  int yi=0;
  int money=0;
  int leftmoney=0;

  scanf("%d", &money);
  leftmoney = money;
  for ( ; ; )
  {
    if (leftmoney>=0)
	{
		leftmoney -= 100;
	    ++yibai;
	}
	else
    {
	  if (yibai==0);
	  else --yibai;
	  break;
	}

  }
  leftmoney += 100;
  for ( ; ; )
  {
    if (leftmoney>=0)
	{
		leftmoney -= 50;
	    ++wushi;
	}
	else
    {
	  if (wushi==0);
	  else --wushi;
	  break;
	}
  }
  leftmoney += 50;
  for ( ; ; )
  {
    if (leftmoney>=0)
	{
		leftmoney -= 20;
	    ++ershi;
	}
	else
    {
	  if (ershi==0);
	  else --ershi;
	  break;
	}
  }
  leftmoney += 20;

  for ( ; ; )
  {
    if (leftmoney>=0)
	{
		leftmoney -= 10;
	    ++shi;
	}
	else
    {
	  if (shi==0);
	  else --shi;
	  break;
	}
  }
  leftmoney += 10;
  for ( ; ; )
  {
    if (leftmoney>=0)
	{
		leftmoney -= 5;
	    ++wu;
	}
	else
    {
	  if (wu==0);
	  else --wu;
	  break;
	}
  }
   leftmoney+=5;
  for ( ; ; )
  {
    if (leftmoney>=0)
	{
		leftmoney -= 1;
	    ++yi;
	}
	else
    {
	  if (yi==0);
	  else --yi;
	  break;
	}
  }

  printf("%d\n%d\n%d\n%d\n%d\n%d\n", yibai, wushi, ershi, shi, wu, yi);

  return 0;
}


int main()
{
 int i,j,k,l,m,n;
 float num;
 scanf("%f",&num);
 i=(int)(num/100);
 num=num-i*100;
 j=(int)(num/50);
 num=num-j*50;
 k=(int)(num/20);
 num=num-k*20;
 l=(int)(num/10);
 num=num-l*10;
 m=(int)(num/5);
 num=num-m*5;
 n=(int)(num);
 num=num-n;
 printf("%d\n%d\n%d\n%d\n%d\n%d\n",i,j,k,l,m,n);

 return 0;
}


int main()
{
	int n,hundred,fifty,twenty,ten,five,one;
	scanf("%d",&n);
	hundred=n/100,n=n%100;
	fifty=n/50,n=n%50;
	twenty=n/20,n=n%20;
	ten=n/10,n=n%10;
	five=n/5;n=n%5;
	one=n;
	printf("%d\n%d\n%d\n%d\n%d\n%d\n",hundred,fifty,twenty,ten,five,one);
	return 0;
}


int main(int argc, char* argv[])
{
	int n,m,p;
	int hun,fif,twenty,ten,five,one;

	scanf("%d",&n);
    hun=n/100;
	n=n%100;

	if(n>=50){
		fif=1;
		m=n-50;
	}
	else if(n<50){
		fif=0;
		m=n;
	}
	twenty=m/20;
	m=m%20;
	if(m>=10){
		ten=1;
		p=m-10;
	}
	else if(m<10){
		ten=0;
		p=m;
	}
	if(p>=5){
		five=1;
		one=p-5;
	}
	else if(p<5){
		five=0;
		one=p;
	}

	printf("%d\n%d\n%d\n%d\n%d\n%d\n",hun,fif,twenty,ten,five,one);

	return 0;
}


int main()
{
	int n;
	cin>>n;
	int result[6];
	int money[6]={100,50,20,10,5,1};
	for(int k=0;k!=6;k++)
	{
		result[k]=n/money[k];
		n-=n/money[k]*money[k];
	}
	for(int k=0;k!=6;k++)
		cout<<result[k]<<endl;
	return 0;
}


int main (){
 int m,bai,wushi,ershi,shi,wu,yi;
 int a,b,c,d,e,f;
 scanf("%d",&m);
 bai=m/100;
 printf("%d\n",bai);
 if(m%100>=50)wushi=1;
 else if(m%100<=50)wushi=0;
 printf("%d\n",wushi);
 if(m%50>=40)ershi=2;
 else if(m%50>=20&&m%50<40)ershi=1;
 else if(m%50<20)ershi=0;
 printf("%d\n",ershi);
 if(m-bai*100-wushi*50-20*ershi>9)shi=1;
 else if(m-bai*100-wushi*50-20*ershi<10)shi=0;
 printf("%d\n",shi);
 if(m%10>=5)wu=1;
 else if(m%10<5)wu=0;
 printf("%d\n",wu);
 yi=m%5;
 printf("%d\n",yi);
 return 0;
}


int main(){
	int money;
	scanf("%d",&money);
	int a=money/100;
	printf("%d\n",a);
	int b=(money-100*a)/50;
    printf("%d\n",b);
	int c=(money-100*a-50*b)/20;
	printf("%d\n",c);
	int d=(money-100*a-50*b-20*c)/10;
	printf("%d\n",d);
	int e=(money-100*a-50*b-20*c-10*d)/5;
    printf("%d\n",e);
    int f=money%5;
	printf("%d",f);
	return 0;
}


int main()
{
 int n;
 scanf("%d",&n);
 int bai,wushi,ershi,shi,wu,yi;
 int yu1,yu2,yu3,yu4,yu5;
 bai=(n-n%100)/100;

 yu1=n-bai*100;
 if(yu1>=50)
 {
  wushi=1;
 }
 else
 {
  wushi=0;
 }

 yu2=yu1-wushi*50;
 ershi=(yu2-yu2%20)/20;

 yu3=yu2-ershi*20;
 shi=(yu3-yu3%10)/10;

 yu4=yu3-shi*10;
 wu=(yu4-yu4%5)/5;

 yu5=yu4-wu*5;
 yi=yu5;

 printf("%d\n",bai);
 printf("%d\n",wushi);
 printf("%d\n",ershi);
 printf("%d\n",shi);
 printf("%d\n",wu);
 printf("%d\n",yi);
    return 0;
}


int main()
{
	int count(int facevalue,int sum,int n);
	int n,sum=0;
	cin>>n;
	int facevalue[6]={100,50,20,10,5,1},num[6];
	for(int i=0;i<6;i++)
	{
		num[i]=count(facevalue[i],sum,n);
		cout<<num[i]<<endl;
		sum+=num[i]*facevalue[i];
	}
	return 0;
}

/*-----?????????-----*/
int count(int facevalue,int sum,int n)
{
	for(int i=0;;)
	{
		if((i+1)*facevalue+sum<=n)
			i++;
		else
			return i;
	}
}


int main(){
	int sum;
	int a1,b1,c1,d1,e1,f1;
	int numa,numb,numc,numd,nume,numf;
	scanf("%d",&sum);
	a1=sum%100;
	numa=(sum-a1)/100;
	b1=(sum-100*numa)%50;
	numb=(sum-100*numa-b1)/50;
	c1=(sum-100*numa-50*numb)%20;
	numc=(sum-100*numa-50*numb-c1)/20;
	d1=(sum-100*numa-50*numb-20*numc)%10;
	numd=(sum-100*numa-50*numb-20*numc-d1)/10;
	e1=(sum-100*numa-50*numb-20*numc-10*numd)%5;
	nume=(sum-100*numa-50*numb-20*numc-10*numd-e1)/5;
	f1=(sum-100*numa-50*numb-20*numc-10*numd-5*nume)%1;
	numf=(sum-100*numa-50*numb-20*numc-10*numd-5*nume-f1);
	printf("%d\n%d\n%d\n%d\n%d\n%d",numa,numb,numc,numd,nume,numf);
	return 0;
}


int main()
{
	int a,b,c,d,e,f,sum;
	scanf("%d",&sum);
    if(sum<1000)
	{
		a=sum/100;
		sum=sum-100*a;
		b=sum/50;
		sum=sum-50*b;
		c=sum/20;
		sum=sum-20*c;
		d=sum/10;
		sum=sum-10*d;
		e=sum/5;
		sum=sum-5*e;
		f=sum;
	}
	printf("%d\n%d\n%d\n%d\n%d\n%d\n",a,b,c,d,e,f);

return 0;
}


int main()
{
  int a=0;
  int b=0;
  int i=0;
  int t=0,z=0,number=0;
  int money[6] = {100,50,20,10,5,1};

  scanf("%d",&a);
  b=a;

  while(i<=4)
  {
	t=b%money[i];
    number=(b-t)/money[i];
	b=t-z*money[i];
	printf("%d\n",number);
	i++;
  }
  printf("%d",b);
  return 0;
}


//
//  main.cpp
//  hw
//
//  Created by ? ? on 12-12-16.
//  Copyright (c) 2012? ? ?. All rights reserved.
//

int main(int argc, const char * argv[])
{
    int num;
    cin>>num;
    int money[6]={100,50,20,10,5,1};
    for (int i=0; i<6; i++) {
        cout<<num/money[i]<<endl;
        num-=(num/money[i])*money[i];
    }
    return 0;
}


int main()
{
	int n;
	cin >> n;
	int a,b,c,d,e;
    a=n/100;
	n=n%100;
	b=n/50;
	n=n%50;
	c=n/20;
	n=n%20;
	d=n/10;
	n=n%10;
	e=n/5;
	n=n%5;
    cout << a <<endl;
	cout << b <<endl;
	cout << c <<endl;
	cout << d <<endl;
	cout << e <<endl;
	cout << n <<endl;
	return 0;
}


int main()
{int n,bai ,wushi,ershi,shi,wu,yi;
	cin>>n;
	bai=n/100;
	wushi=(n-100*bai)/50;
	ershi=(n-100*bai-50*wushi)/20;
	shi=(n-100*bai-50*wushi-20*ershi)/10;
    wu=(n-100*bai-50*wushi-20*ershi-10*shi)/5;
	yi=n%5;
	cout<<bai<<endl;
	cout<<wushi<<endl;
	cout<<ershi<<endl;
	cout<<shi<<endl;
	cout<<wu<<endl;
	cout<<yi<<endl;
	return 0;
}


int main()
{
	int money,sum=0;
	int num[6]={0,0,0,0,0,0};
	cin>>money;
	while(sum+100<=money)
	{sum+=100;num[0]++;}
	while(sum+50<=money)
	{sum+=50;num[1]++;}
	while(sum+20<=money)
	{sum+=20;num[2]++;}
	while(sum+10<=money)
	{sum+=10;num[3]++;}
	while(sum+5<=money)
	{sum+=5;num[4]++;}
	while(sum+1<=money)
	{sum+=1;num[5]++;}
	for(int i=0;i<6;i++)
		cout<<num[i]<<endl;
	return 0;
}


int main()
{
    int m,n,x,i,an=0;
    cin>>m;
    if  (m/100>0) {cout<<m/100<<endl;m=m% 100;}else cout<<0<<endl;
      if  (m/50>0) {cout<<m/50<<endl;m=m% 50;}else cout<<0<<endl;
        if  (m/20>0) {cout<<m/20<<endl;m=m% 20;}else cout<<0<<endl;
          if  (m/10>0) {cout<<m/10<<endl;m=m% 10;}else cout<<0<<endl;
            if  (m/5>0) {cout<<m/5<<endl;m=m% 5;}else cout<<0<<endl;
     cout<<m;
 cin>>m;

    return 0;

    }


int main()
{
	int n,a,b,c,d,e,f;
	int A,B,C,D,E;
	cin>>n;
	a=n/100;
	A=n%100;
	b=A/50;
	B=A%50;
	c=B/20;
	C=B%20;
	d=C/10;
	D=C%10;
	e=D/5;
	E=D%5;
	f=E;
	cout<<a<<endl;
	cout<<b<<endl;
	cout<<c<<endl;
	cout<<d<<endl;
	cout<<e<<endl;
	cout<<f<<endl;
	return 0;
}


int main()
{
	int n,left=0;
	cin>>n;
	cout<<n/100<<endl;
	left=n%100;
	cout<<left/50<<endl;
	left=left%50;
	cout<<left/20<<endl;
	left=left%20;
	cout<<left/10<<endl;
	left=left%10;
	cout<<left/5<<endl;
	left=left%5;
	cout<<left<<endl;

	return 0;
}


int main(){
    int yuan,e;
    scanf("%d",&yuan);
    int n=6;
    int shu[n];
    int mian[n];
    mian[0]=100,mian[1]=50,mian[2]=20,mian[3]=10,mian[4]=5,mian[5]=1;
    for(int i=0;i<6;i++){
        e=yuan/mian[i];
        shu[i]=e;
        yuan=yuan-mian[i]*e;
        printf("%d\n",shu[i]);
    }
    return 0;
}