semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
void main()
{
	char a[105]={"1"},temp;
	int s,b[105],i,j,k;
	scanf("%d",&s);
	while(s--){
		for(i=0;a[i]!=0;i++){
			b[i]=(a[i]-'0')*2;
		}
		for(j=0;j<i;j++){
			if(j==i-1&&b[j]>=10){
				b[j]-=10;
				b[j+1]=1;
				i++;
				break;
			}
			if(b[j]>=10){
				b[j]-=10;
				b[j+1]++;
			}
		}
		for(j=0;j<i;j++)a[j]=b[j]+'0';
		a[j]=0;
	}
	for(j=0,k=i-1;j<k;j++,k--){
		temp=a[j];
		a[j]=a[k];
		a[k]=temp;
		}
	puts(a);
}
int main()
{
	int n, i , k, te, a[100], yu=0, io=0;
	cin >> n;
	memset(a, 0 , sizeof(a));
	a[0] = 1;
	if(n==0)
		cout << a[0] << endl;
	else 
	{
		for(i = 1; i <= n; i++)
          for(k = 0; k < 100; k++)
		  {
			  io = yu;                   //io?????, yu????
			  te = a[k] * 2;
			  if(te > 9)
			  {
				  yu = 1;
				  a[k] = te - 10 + io;
			  }
			  else
			  {
			      a[k] = te + io;
			      yu = 0;
			  }
		  }
	  for(k = 99; a[k] == 0; k--);
	  for(i = k; i >= 0; i--)
		cout << a[i] ;
	}
	return 0;
}
void play(int a[100],int b[100]);
int end[100]={0};
int main()
{  
	int a[100]={0},N,i=0,j=0;
	cin>>N;
	a[1]=2;
    if(N==0){cout<<"1";return 0;}
	else
	{
		for(i=0;i<N-1;i++)
        {
			play(a,a);
			for(j=0;j<100;j++)
			{a[j]=end[j];}
		}
	}
	for(i=99;i>=0;i--)
	{if(a[i]!=0)break;}
	for(j=i;j>0;j--)
	{cout<<a[j];}
	return 0;
}

void play(int a[],int b[])
{
	int p,f[100]={0},i=0;
	for(i=0;i<100;i++)
	{
		if(a[i]+b[i]+f[i]>=10)
		{
		  end[i]=(a[i]+b[i]+f[i])-10;
		  f[i+1]++;
		}
	   else
	   {
		 end[i]=a[i]+b[i]+f[i];
	   }
	}

}
main()
{
int n,i,k;
scanf("%d",&n);
   int v[1001]={0};
     v[0]=1;
     while(n--)
{
for(i=0;i<=1000;i++)
v[i]=v[i]*2;
for(i=0;i<=1000;i++)
  {
if(v[i]>=10)
   {
       v[i]=v[i]-10;
        v[i+1]=v[i+1]+1;
  }
}
}
//printf("%d\n",v[1]);
int flag=0;
for(i=1000;i>=0;i--)
   {
     if(v[i]!=0)
       { for(k=i;k>=0;k--)

        printf("%d",v[k]);
  

flag=1;
  break;
    }
if(flag)
 break;
}

}
int main()
{
int N;
cin >> N;
if( N == 0 )
{ cout << "1" ;return 0; }
char a[1000] = "2";
for( int i = 0; i< N - 1; i++ )
{
char b[1000];
int yushu = 0, j;
for( j = 0; j < strlen( a ); j++ )
{
b[j] = ( a[j] - '0' ) * 2 + yushu;
yushu = b[j] / 10;
b[j] = b[j] % 10 + '0';
}
if( yushu != 0 )
{ b[j] = yushu + '0';b[j + 1] = '\0';}
else
{ b[j] = '\0'; }
strcpy( a, b );
}
for( int i = strlen( a ) - 1 ; i >= 0; i-- )
cout << a[i];
}
/**  
* @file   ??2?N??    .cpp  
* @author ???
* @date   2013-11-16  
* @description 
*          ??????: ??2?N??  
*/ 


int main()
{
	int N;
	double a[500]={0};
	cin>>N;
	a[0]=1;
	for(int i=1;i<=N;i++)
	{
		for(int j=0;;j++)
		{
			if(a[j]==0&&a[j+1]==0&&a[j+2]==0)
				break;
			a[j]=a[j]*2;
			if(a[j]>=10)
			{
				a[j]=a[j]-10;
				a[j+1]=a[j+1]+0.5;
			}
		}
	}
	for(int i=499;i>=0;i--)
	{
		if(a[i]!=0)
		{
			for(int j=i;j>=0;j--)
				cout<<a[j];
			break;
		}
	}
	return 0;
}
//**************************
//*?????2?N??     **
//*??????           **
//*???20131114         **
//************************** 
int main ()
{
	int n ,i ,j ,k ,nLen ,h ,lg ,q ,flag;
	int a[9999] ,b[9999];
	memset(a,0,sizeof(a));
	cin >> n;
	if(n == 0)
		cout << "1" << endl;
	if(n == 1)
		cout << "2" << endl;//??????
	if(n != 0 && n != 1)
    {
		memset(b,0,sizeof(b));//????
		a[0] = 2;
		lg = 1;
	    for(i = 1; i <= n-1; i++)
		{
			for(j = 0; j <= lg-1; j++)
				b[j] = 2 * a[j];//?????2
			for(q = 0; q <= n-1; q++)
			{
				if(q == lg-1)
				{
					if(b[q] > 9)
						lg++;
				}
				if(b[q] > 9)
				{
					b[q] -= 10;
					b[q+1] += 1;//????10???
				}
			}
		    for(k = 0; k <= lg-1; k++)
				a[k] = b[k];//??
		}
		for(h = lg-1; h >= 0; h--)
			cout << a[h];
		cout << endl;
	}
	return 0;
}
void f(int n,int a[100])
{  if(n==0)  return ;
   else 
     {  int b[100]={0};
        int i;
        for(i=1;i<100;i++)
          {  b[i]=(2*a[i])/10;
             a[i]=(2*a[i])%10+b[i-1];
          }
        f(n-1,a);
     } 
}
             
int main()
{  int n;
   cin>>n;
   int a[100]={0};
   a[1]=1;
   f(n,a);
   int i;
   int t=0;
   for(i=99;i>=1;i--)
     {  if(a[i]!=0)  t=1;
        if(t==1)  cout<<a[i];
     }
   return 0;
}
char s[50];                              //?????????2?100???????50??
int i,j,k;
int flag=0;
void f(int n)                           //?????????2?n??????
{
    if(n==0)  return;
    else if(n==1)
    {
        for(i=48; i>=0; i--)       
        {
            s[i]=(s[i]-'0')*2+flag;    //???????????????2???
            if(s[i]>=10)                //??????????10?????
            {
                flag=s[i]/10;
                s[i]=s[i]%10+'0';

            }
            else
            {
                flag=0;                //???????
                s[i]=s[i]+'0';
            }
        }
        return;
    }
    else if(n==2)
    {
        for(i=48; i>=0; i--)          
        {
            s[i]=(s[i]-'0')*4+flag;    //???????????????4???
            if(s[i]>=10)                //??????????10?????
            {
                flag=s[i]/10;
                s[i]=s[i]%10+'0';

            }
            else
            {
                flag=0;                //???????
                s[i]=s[i]+'0';
            }
        }
        return ;
    }
    else
    {
        for(i=48; i>=0; i--)          
        {
            s[i]=(s[i]-'0')*8+flag;    //???????????????8???
            if(s[i]>=10)                //??????????10?????
            {
                flag=s[i]/10;
                s[i]=s[i]%10+'0';

            }
            else
            {
                flag=0;                //???????
                s[i]=s[i]+'0';
            }
        }
        f(n-3);                        //??????n-3???
    }
}
int main()
{
    int n;
    cin>>n;
    memset(s,'0',sizeof(s));            //??????????0
    s[48]='1';                          //???s[48]?1
    f(n);                              //????
    i=0;
    while(s[i]=='0')                    //??????0?????
    {
        i++;
    }
    for(j=i; j<=48; j++)                //???????????????s[48]
    {
        cout<<s[j];
    }
    return 0;
}
int main()
{
    int n;
    cin >> n;
    char str[102];
    str[1] = '1';
    for (int i = 2; i < 102; i++)
        str[i] = '0';
    int num[102];
    for (int i = 1; i < 102; i++)
        num[i] = str[i] - '0';
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= 101; j++)
            num[j] *= 2;
        for (int j = 1; j <= 101; j++)
            if (num[j] >= 10)
            {
                 num[j] = num[j] - 10;
                 num[j + 1]++;
            }
    }
    int j = 101;
    while (num[j] == 0)
    {
          j--;
    }
    for (; j >= 1; j--)
        cout << num[j];
    cout << endl;
    return 0;
}
int main()

{

    int N;


    int value[1001] = {0}; 

    int i;

    value[1000] = 1;

    

    scanf("%d", &N); //2^N




    while(N--)

    {

     

        for(i = 1000; i > 0; i--)

        {

            value[i] *= 2;

        }



        for(i = 1000; i > 0; i--)

        {

            if(value[i] >= 10)

            {

                value[i] -= 10;

                value[i-1] += 1;

            }

        }

    }





    for(i = 0; i <= 1000; i++)

    {

        if(value[i] != 0)

        {

            while (i <= 1000)

            {

                printf("%d", value[i]);

                ++i;

            }



            break;

        }

    }




    return 0;

}
//*****************************
//*?????? 1300012809   **
//*???2013.11.16          **
//*?????2?N??        **
//*****************************
int main()
{
	int n, i, j, changdu;                                                
	changdu = 1;                                            //?????
	int a[1005] = {0};                                      //?????a
	cin >> n;
	for (i = 0; i <= n; i++)                                //??n+1?
	{
		if (i == 0) a[0] = 1; 
		if (i == 1) a[0] = 2;
		if (i != 0 && i != 1)
		{
			if (a[changdu-1] >= 5 ) changdu += 1;           //??*2????????????????
			for (j = 0; j < changdu; j++)
			{
				a[j] = a[j]*2;                              //????????
			}
			for (j = 0; j < changdu; j++)
			{
				a[j+1] = a[j] / 10 + a[j+1];                //??10???
				a[j] = a[j] % 10 ;
			}

		}
	}
	for (j = changdu-1; j >= 0; j--) cout << a[j];          //??????
	cout << endl;
	return 0;
}
int main()
{
    int k , i ,j ,len;
    int str[100];
    memset( str , 0 ,sizeof( str )  );
    scanf("%d",&k);
    str[0]  = 2;
    len =1;
    for( i = 2 ;i <= k; i ++ )
    {
        for( j = 0 ; j < len ;j++ )
        str[j] = str[j]*2;
        for( j = 0 ;j < len ;j++ )
        {
        if( str[j] >= 10 )
          {str[j]-=10;        
          str[j+1] += 1;
          }
        }
         if( str[len] != 0 )
         len ++;
    }
    
    if( k == 0 )printf("1");
    else
    {
    for( i = len-1;i >= 0 ;i-- )
    printf("%d",str[i]);
     }
}
//****************************************************** 
/* ? ? ?   ???2?n???????
/* ? ?      ????                           
/* ? ? ? ??2010 ?  12 ?  15  ?     
/* ? ? ? ????2?n???n????100?
/* ? ?      ?1000012752        
*******************************************************/ 
void chengfang(int result[],int n)
{
	int i;
	if(n==0)										//????
		return;
	else
	{	
		for(i=32 ; i>=0 ; i--)
		{
			result[i] = result[i] * 2;				//???2
		}
		for(i=32 ; i>0 ; i--)						//??
		{
			if(result[i] >= 10)
			{
				result[i-1] += result[i] / 10;
				result[i] %= 10;
			}
		}
		chengfang(result,n-1);						//???????n=0???????n??
	}
}                     
int main()                                  
{
    int result[33],*p;
	int n;
	cin >> n;
	memset(result,0,sizeof(result));
	result[32] = 1;									//???????1
	chengfang(result,n);
	p = result;										//????????0??
	while(*p == 0)   p++;
	for( ; p<=result+32 ; p++)						//???????
		cout << *p;
    return 0;
}
int main()
{
	int n=0,d=0,i=0,j;
	int a[1000]={0};
	memset(a,0,sizeof(a));
	cin>>n;
	int p=1;
	a[1]=1;
	for(i=1;i<=n;i++)
	{
		d=0;
		for(j=1;j<=p;j++)
		{
			a[j]=d+a[j]*2;d=d-d;
			if(a[j]>=10)
			{
				a[j]=a[j]-10;d=1;
			}
		}
	   a[p+1]=d+a[p+1];
	if(a[p+1]!=0)
	{p=p+1;}
	}
	i=999;
	for(;i>=0;i--)
	{
		if(a[i]!=0) 
		{p=i;break;}
	}
	for(i=p;i>=1;i--)
		cout<<a[i];
	return 0;
}
int a[500] = {0};
void f(int c)
{
	int i;
	if (c == 0)
	{
		return ;
	}
	if (c == 1)
	{
		for (i = 0 ; i <= 499 ; i++)
		{
			a[i] *= 2;
		}
		for (i = 499 ; i >= 1 ; i--)
		{
			a[i - 1] += a[i] / 10;
			a[i] %= 10;
		}
		a[0] %= 10;
		return ;
	}
	if (c % 2 == 0)
	{
		f(c / 2);
		f(c / 2);
		return ;
	}
	else
	{
		f(1);
		f(c / 2);
		f(c / 2);
		return ;
	}
}
int main()
{
	int n , i , flag = 0;
	cin >> n;
	a[499] = 1;
	f(n);
	for (i = 0 ; i <= 499 ; i++)
	{
		if (flag == 0)
		{
			if (a[i] != 0)
			{
				flag = 1;
				cout << a[i];
			}
		}
		else
		{
			cout << a[i];
		}
	}
	cout << endl;
	return 0;
}
char number[100];
char transnum[100];
void inttochar(int num)
{
	int i = 0;
	char temp[100];
	do
	{
		temp[i] = num % 10 + '0';
		num = num / 10;
		i++;
	}while(num != 0);
	for (int j = i - 1; j >= 0; j--)
	{
		number[i - 1 - j] = temp[j]; 
	}
	return;
}
void multiply(char number[], int k)
{
	int t = 0;
	for(int j = strlen(number) - 1; j >= 0; j--)
	{
		transnum[j + 1] = ((number[j] - '0') * k + t)% 10 + '0';
		t = ((number[j] - '0') * k + t)/ 10;
	}
	transnum[0] = t + '0';
	strcpy(number, transnum);
	return;
}
int main()
{
	int n;
	cin >> n;
	if (n < 31)
	{
		cout << (int)pow((double)2, n) << endl;
	}
	else
	{
		int num = (int)pow((double)2, 30);
		inttochar(num);
		n = n - 30;
		while (n != 0)
		{
			if (n <= 3)
			{
				int k = (int)pow((double)2, n);
				multiply(number, k);
				n = 0;
			}
			else
			{
				multiply(number, 8);
				n = n - 3;
			}
		};
		int i = 0;
		do
		{
			if(number[i] != '0')
				break;
			else
				i++;
		}while(1);
		for (int j = i; j < strlen(number); j++)
		{
			cout << number[j];
		}
		cout << endl;
	}
	return 0;
}
int main ()
{
	int m=1,n,i,c=0,sz[1000],p,j,b;
	scanf("%d",&n);
	if(n<=30){
	    for(i=0;i<n;i++){
			m*=2;
		}
	printf("%d",m);
	}
	else{
		sz[0]=4;
		sz[1]=2;
		sz[2]=8;
		sz[3]=1;
		sz[4]=4;
		sz[5]=7;
		sz[6]=3;
		sz[7]=7;
		sz[8]=0;
		sz[9]=1;
		p=10;
		b=p;
		for(i=0;i<n-30;i++){
			c=0;
			for(j=0;j<p;j++){
			   sz[j]=sz[j]*2+c;
			   if(sz[j]>=10&&j<p-1){
				  c=1;
				  sz[j]=sz[j]-10;
			   }
			   else if(sz[j]<10){
				 c=0;
			   }
			   else if(sz[p-1]>=10){
				  sz[p-1]=sz[p-1]-10;
				  sz[p]=1;
				  b=p+1;
			   }
			}
			p=b;
		}

		for(i=p-1;i>=0;i--){
			printf("%d",sz[i]);
		}
	}
		

	return 0;
}
int main()
{
int i,a;
double d;
scanf("%d",&a);
d=1;
if(a==0){
d=1;
}
if(a!=0){
for(i=1;i<=a;i++){
d=d*2;
}
}
printf("%.0lf",d);
}
int main()
{
	int N;
	cin >> N;
	const int  MAX_LEN = 210;
	unsigned num[MAX_LEN + 1] = { 0 };
	num[1] = 1;

	for (int i = 1; i <= N; i++)
	{
		for (int k = 1; k <= N; k++)
			num[k] *= 2;
		for (int k = 1; k <= N; k++)
			if (num[k] >= 10)
			{
				num[k + 1] = num[k + 1] + num[k] / 10;
				num[k] = num[k] % 10;
			}
	}
	int j = MAX_LEN;
	while (num[j] == 0)
		j--;
	for (int k = j; k > 0; k--)
		cout << num[k];
	cout << endl;
	return 0;
}
int main()
{
	int m[100] = {0};
	m[0] = 2;
	int N,i,j,temp = 0,t = 0,count = 0;
	cin >> N;
	if(N == 0)
		cout << 1 << endl;
	else
	{
		for(i = 1 ; i < N ; i++)
		{
			for(j = 0 ; j <= count + 1 ; j++)
			{
				t = m[j] * 2 + temp;
				temp = t / 10;
				m[j] = t % 10;
			}
			for(j = 100 ; j >= 0 ; j--)
			{
				if(m[j]==0 && m[j-1] != 0)
				{
					count = j;
					break;
				}
			}
		}
		for(i = 99 ; m[i] == 0 ; i--);
		for(j = i ; j >= 0 ; j--)
		{
			cout << m[j];
		}
	}
	return 0;
}
int main()
{
	int n,cnt=0;
	cin>>n;
	int num[100]={0};
	num[0]=1;
	for(int j=0;j<n;j++)
	{
	
	for(int i=0;i<100;i++)
	{
		num[i]=num[i]*2;
	}
	for(int i=0;i<100;i++)
	{
		if(num[i]>=10)
		{
			num[i+1]+=num[i]/10;
			num[i]=num[i]%10;
		}
	}
	}
	int k=99;
	while(num[k]==0) k--;
	for(int i=k;i>=0;i--)
		cout<<num[i];
			
	
	return 0;
}
//***********************************************************************************
//???????2?n??
//??  ????
//???  11-13
//***********************************************************************************


int main()
{
	int n;                    //??
	int a[41] = {0};          //??????????0
	int i, j, k;

	cin >> n;

	a[40] = 1;                 //???????????

	for(k = 0; k < n; k ++)
	{
		int tem[41] = {0};                    //????????????

		for(i = 40; i >= 0; i --)
			tem[i] = a[i] * 2;

		for(i = 40; i >= 0; i --)              //???????????a[]???
		{
			tem[i - 1] += tem[i] / 10;
			a[i] = tem[i] % 10;
		}
	}

	int count = 0;                            //??????0???

	for(i = 0; i <= 40; i ++)
	{
		if(a[i] == 0 && count == 0)
			continue;
		else
		{
			cout << a[i];
			count = 1;
		}
	}


	
	return 0;
}
int main()
{
	int num[1000] = {0}, up, add, i, k, n;
	cin >> n;
	num[0] = 1;
	if (n == 0)
	{
		cout << 1;
		return 0;
	}
	up = 0;
	while (n > 0)
	{
		add = 0;
		for (i = 0; i <= up; i++)
		{
			k = (num[i] * 2 + add) / 10;
			num[i] = (num[i] * 2 + add) % 10;
			add = k;
		}
		if (add != 0)
			num[++up] = add;
		n--;
	}
	for (i = up; i >= 0; i--)
		cout << num[i];
	return 0;
}
int main()
{
    int a[110]={0};
    int n ;
    cin>>n;
    a[0]=1;
    for(int i=0;i<n;i++)
    {
          for(int j=0;j<100;j++)
          {
             a[j]=a[j]*2;
          }
          //for(int j=0;j<20;j++)
          //{cout<<a[j]<<endl ;}
          for(int j=0;j<100;j++)
          {
             if(a[j]>9)
             {
                 //cout<<a[j]<<endl;
                 a[j+1]=a[j+1]+(a[j]/10);
                 a[j]=a[j]%10;
                 //cout<<a[j+1]<<",,,"<<endl;
             }
          }
                 
    }
    //cout<<a[0]<<endl;
    for(int i=99;i>=0;i--)
    {
            if(a[i]!=0)
            {
              
              for(int j=i;j>=0;j--)
              {
                  cout<<a[j]; 
                  
              }
              break;
            }
    }
   
    return 0;
    
}
int main()
{
	int num[101]={0};
	int N,q,i,j=0;
	cin>>N;
	num[0]=1;
	for(q=1;q<=N;q++)
	{	
		for(i = 0;i<=100 ; i++)
			num[i]= num[i] * 2; //???????????
		for (i = 0;i<=100 ; i++)
			if(num[i] >= 10)
			{
				num[i + 1] = num[i+1] +num[i]/10; //?????????
				num[i] =num[i]%10; //???????????
			}
	}
	i=100;
	while(num[i]== 0){ i--;} //???????0??
		for (j=i; j >= 0; j--)
			cout << num[j];
		//??????
	
return 0;
}
int main()
{
     int n,i,j;
     int a[100]={0};
	 scanf("%d",&n);
     a[0]=1;
	 for(i=0;i<n;i++)
	 {
	     for(j=0;j<100;j++)
	        a[j]=a[j]*2;
	    for(j=0;j<100;j++)
	    {
	        if(a[j]>=10)
	        {
	           a[j+1]=a[j+1]+a[j]/10;
	           a[j]=a[j]%10;
			
			}
		
		}
	 
	 
	 }     
    for(i=99;i>=0;i--)
     if(a[i]!=0) break;
     for(j=i;j>=0;j--)
     printf("%d",a[j]);
	 return 0;





}
int main()
{
	int a[1000]={0};
	a[0] = 2;
	int k;
	cin >> k;
	if(k==0)
		cout << "1";
	if(k==1)
		cout << "2";
	if(k>=2)
	{
	int i,j;
	for(i = 0; i < k -1 ;i++)
	{
		for(j =0;j<1000;j++)
		{
			a[j] = 2 * a[j]; 
		}
		for(j = 0;j<1000;j++)
		{
			if(a[j]>=10)
			{
				a[j+1] = a[j+1]+a[j]/10;
				a[j] = a[j]%10;
			}
		}
	}
	int flag = 0;
	for(i = 999; i>=0;i--)
	{
		if(a[i]==0&&flag==0)
			continue;
		if(a[i]!=0)
		{
			cout << a[i];
			flag = 1;
		}
		if(a[i] == 0 &&flag ==1 )
			cout << a[i];
	}
	}
	int wo;
	cin >> wo;
	return 0;
}
int result[100000] = {2};

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

	if (N == 0)
	{
		cout << 1 << endl;
	}
	else 
	{
		for (int i = 0; i < N - 1; i++)
		{
			for (int j = 0; j < 100000; j++)
			{
				result[j] *= 2;
			}

			for (int k = 0; k < 100000; k++)
			{
				if (result[k] >= 10)
				{
					result[k+1] += result[k]/10;
					result[k] %= 10;
				}
			}
		}

		int n = 99999;
		while (result[n] == 0)
		{
			n--;
		}

		for (int l = n; l >= 0; l--)
		{
			cout << result[l]; 
		}
	}

	return 0;
}
int a[10000],b[10000],c[10000],ans[10000];

void cheng(int a[10000])
{
    int i,j,m;
    memset(c,0,sizeof(c));
    for (i=1;i<=a[0];i++)
    {
        c[i]=c[i]+a[i]*2;
        c[i+1]=c[i+1]+c[i]/10;
        c[i]=c[i]%10;
    }
    j=a[0]+10;
    while (j>0&&c[j]==0) j--;
    a[0]=j;
    for (i=1;i<=j;i++) a[i]=c[i];
}

int main()
{
    int i,j,k,m,n;
    cin >>k;
    memset(ans,0,sizeof(ans));
    memset(a,0,sizeof(a));
    ans[0]=1;ans[1]=1;
    for (i=1;i<=k;i++)
        cheng(ans);
    for (i=ans[0];i>0;i--) cout <<ans[i];
    return 0;
}
int main()
{int b[2][100]={0};
b[0][0]=2;
int n,i,j,k;
cin>>n;
if(n==0)
cout<<"1"<<endl;
else if(n==1)
cout<<"2"<<endl;
else{
for(i=1;i<n;i++)
{k=90;
while(b[0][k]==0)k--;

for(j=0;j<=k+1;j++)
{if(j!=0)
{b[1][j]=b[0][j]*2+b[1][j-1]/10;
b[0][j]=b[1][j]%10;}
else {b[1][0]=b[0][0]*2;
b[0][0]=b[1][0]%10;
}}}

k=90;
while(b[0][k]==0)k--;

for(;k>=0;k--)
cout<<b[0][k];}
return 0;
}
int main(){
int n,i,e,d,k=1;
int sz[100]={0},sum[100]={0};
sz[0]=2;
scanf("%d",&n);
int c=0;
for(i=0;i<n-1;i++){
	for(d=0;d<100;d++){
	sum[d]=sz[d]+sz[d]+c;
		if(sum[d]>=10){
		sum[d]-=10;
		c=1;
		}else{
		c=0;
		}
	}
	for(e=0;e<100;e++){
	sz[e]=sum[e];
	}
}
int f=99;
while(sz[f]==0){
f--;
}
if(n!=0){
	for(i=f;i>=0;i--){
	printf("%d",sz[i]);
	}
}else{
printf("1");
}
printf("\n");
return 0;
}
char s[100] = {0};

void cal()
{
	int len = strlen(s);
	int num[100] = {0};
	for(int i  = 0; i < len; i++)
	{
		num[i] = s[i] - '0';
	}
	for(int i = 0; i < len; i++)
	{
		num[i] *= 2;
	}
	for(int i = 0; i < len; i++)
	{
		if(num[i] > 9)
		{
			num[i + 1] +=num[i] / 10;
			num[i] %= 10;
		}
	}
	if(num[len] == 0)
	{
		for(int i = 0; i < len; i++)
		{
			s[i] = (char)(num[i] + '0');
		}
	}
	else
	{
		for(int i = 0; i <= len; i++)
		{
			s[i] = (char)(num[i] + '0');
		}
	}
}
int main() {
	int n;
	cin >> n;
	s[0] = '1';
	for(int i = 0; i < n; i++)
		cal();
	int l = strlen(s);
	for(int i = l - 1; i >= 0; i--)
	{
		cout << s[i];
	}
	cout << endl;
	
	return 0;
}
//********************************
//* ??????2?N??         *
//* ??????                 *
//* ???2010-12-16             *
//* ?????2?N??           *
//********************************



void product(int res[200], int N)
{
	int i, j;

	for(i = 1; i <= N; i++)
	{
		for(j = 0; j < 199; j++)
		{
			res[j] = res[j] * 2;
		}
		for(j = 0; j < 199; j++)
			if(res[j] >= 10)
			{
				res[j + 1] += res[j] / 10;
				res[j] = res[j] % 10;
			}
		
	}
	for(i = 199; i >= 0; i--)
		if(res[i] != 0)
		{
			for(j = i; j >= 0; j--)
			{
				cout << res[j];
			}
			break;
		}
	return;
}

int main()
{
	int res[200] = {1};
	int N;

	for(int i = 1; i < 200; i++)
		res[i] = 0;
	cin >> N;

	if(N == 0)
		cout << '1' << endl;
	else product(res, N);

	return 0;
}
int main()
{
	int n,i,cnt=0,len1=1,len2=1;
	cin >> n;
	char a[100];
	a[0]=49;
	for(i=1; i<100; i++)
	{
		a[i]=48;
	}
	while(cnt<n)
	{
		for(i=len1-1; i>=0; i--)
		{
			if((a[i]-48)*2>=10)
			{
				a[i+1]+=1;
				if(i==len1-1)
				len2+=1;
			}
			a[i]=((a[i]-48)*2)%10+48;
		}
		len1=len2;
		cnt++;
	}
	for(i=len1-1; i>=0;i--)
		cout<<a[i];
	return 0;
}
int main()
{
	int N,i,j;
	int a[100] = {0};
	a[99] = 1;
	cin >> N;
	for ( i = 0 ; i < N; i ++)
	{
		for (j = 99; j >= 0; j --)
		{
			a[j] = a[j] * 2;
		}
		for ( j = 99; j >= 0; j --)
		{
			if (a[j] >= 10) 
			{
				a[j-1] = a[j-1] + 1;
				a[j] = a[j] % 10;
			}
		}
	}
	int b = 0;
	for (i = 0; i < 100; i ++)
	{
		if (!(a[i] == 0 && b == 0)) 
		{
			b ++;
			cout << a[i];
		}
	}
	cout << endl;
}
int main()
{
	int n,i;
	int a[1000];
	memset(a,0,sizeof(a));
	a[0]=1;
	cin >> n;
	for(i=0;i<n;i++)
	{
		int j;
		for(j=0;j<1000;j++)
			a[j]=a[j]*2;
		for(j=0;j<1000;j++)
			if(a[j]>9)
			{
				a[j]=a[j]%10;
				a[j+1]++;
			}
	}
		for(i=999;i>=0;i--)
			if(a[i]!=0)
				break;
		int s;
		for(s=i;s>=0;s--)
			cout << a[s];
		cout << endl;
	return 0;
}
int main()
{
	int n,a[100]={0};
	cin >> n;
	if(n==0)
		cout<<1;
	else
	{
		a[0]=2;
		for(int i=1;i<n;i++)
		{
			for(int j=0;j<100;j++)
				a[j] *= 2;
			for(int j=0;j<100;j++)
			    if(a[j] >= 10)
				{
					a[j+1] +=1;
				    a[j] %= 10;
				}
		}
	    int k=99;
		while(a[k] == 0)
			k--;
		while(k>=0)
			cout<<a[k--];
	}
	return 0;
}
int a[MAXN];
int n,i;
int main()
{
    cin>>n;
    a[0]=1;
    while(n--)
    {
        for(i=0;i<MAXN;i++)      
        a[i]*=2;
        for(i=0;i<MAXN-1;i++)
        {
            a[i+1]+=a[i]/10;
            a[i]%=10;   
        }
    }
    for(i=MAXN-1;i>0&&a[i]==0;i--);//????? ????????? 
    for(;i>=0;i--)
        cout<<a[i];
        cout<<endl;
     return 0;  
  
  
}
char number[100];
int main()
{
	number[0]='0';
	int n;
	cin>>n;
	void power(int);
	if(n==0)
		cout<<"1"<<endl;
	else
	{
	power(n-1);
	int i;
	for(i=1;i<=strlen(number)-1;i++)
		cout<<number[i];
	}
	return 0;
}

void power(int n)
{
	if(n==0)
		number[1]='1';
	else
		power(n-1);
	int len=strlen(number);
	int a[100];
	a[len-1]=0;
	int i;
	for(i=len-1;i>=1;i--)
	{
		if(2*(number[i]-'0')+a[i]<=9)
			number[i]=2*(number[i]-'0')+a[i]+'0',a[i-1]=0;
		else
			number[i]=2*(number[i]-'0')+a[i]-10+'0',a[i-1]=1;
	}
	if(a[0]==1)
		number[0]='1';
	else
		number[0]='0';
	if(number[0]!='0')
	{
		for(i=len;i>=1;i--)
			number[i]=number[i-1];
		number[0]='0';
	}
}
int main()
{
	int n,i,j,k=1;
	int b[200]={1},c[200]={0};
	cin>>n;
	for(i=0;i<n;i++)
	{
		for(j=0;j<=k;j++)
			c[j]=0;
		for(j=0;j<k;j++)
		{
			c[j]+=2*b[j];
			c[j+1]+=c[j]/10;
			c[j]=c[j]%10;
		}
		if(c[k])
			k++;
		for(j=0;j<k;j++)
			b[j]=c[j];
	}
	for(i=k-1;i>=0;i--)
		cout<<b[i];
	cout<<endl;
	return 0;
}
int main()
{
int a[100]={0};
int i,key=0,n,j,p;
scanf("%d",&n);
a[key]=1;
for(i=1;i<=n;i++)
{
   for(j=0;j<100;j++)
   {
    if(a[j]!=0) 
    a[j]=a[j]*2; 
  } 
   for(j=0;j<100;j++)
   { 
    if(a[j]>=10) 
    {a[j]=a[j]%10;a[j+1]=a[j+1]+1;}
   } 
}

for(i=99;i>=0;i--)
if(a[i]!=0){p=i;break;}
for(i=p;i>=0;i--)
printf("%d",a[i]);
printf("\n");
return 0;
}
int main()
{
	int N;
	cin>>N;//??N
	int a[100]={0};//??????????
	a[99]=1;//?????????????1
	for(int i=1;i<=N;i++)
		for(int j=0;j<=99;j++)
		{
			a[j]=a[j]*2;//?????2
			if(a[j]>=10)//????????10
			{
				a[j-1]=a[j-1]+1;//?????
				a[j]=a[j]-10;//???10
			}
		}
	int i=0;
	while(a[i]==0)i++;//???????????????????
	for(int j=i;j<=99;j++)
		cout<<a[j];//??
	cout<<endl;
	return 0;
}