semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
char r[101];
int main()
{
    int N,i,j,k,num;
    cin>>N;
    r[0]='1';
    if(N==0)
    {
        cout<<1;
        return 0;
    }
    else 
    {
        for(i=1;i<=N;i++)
        {
              k=0;
              for(j=0;j<strlen(r);j++)
                {
                    if (r[j]>='0'&&r[j]<='4')
                    {   
                        r[j]='0'+2*(r[j]-'0')+k;
                        k=0;
                    }
                    else
                    {
                        r[j]='0'+2*(r[j]-'5')+k;
                        k=1;
                    }
                }
                if(k==1) r[j]='1';
            
        }
    }
    for (i=strlen(r)-1;i>=0;i--)
    cout << r[i];
    return 0;
}
int main()
{
	int n, num[35], i, j;
	memset(num, 0, sizeof(num));
	cin >> n;
	if(n != 0)
	{
		num[0] = 2;
		for(i = 1; i < n; i++)
		{
			for(j = 0; j < 35; j++)
				num[j] *= 2;
			for(j = 0; j < 35; j++)
			{
				if(num[j] >= 10)
				{
					num[j + 1] += num[j] / 10;
					num[j] = num[j] % 10;
				}
			}
		}
		i = 34;
		while(num[i] == 0)
			i--;
		for( ; i >= 0; i--)
			cout << num[i];
		cout << endl;
	}
	if(n == 0)
		cout << 1 << endl;
	return 0;
}
int main()
{
    int n, ans[101], len, t;
    memset(ans, 0, sizeof(ans));
    ans[0] = 1;
    len = 0;
    
    cin >> n;
    
    for (int i = 1; i <= n; ++i)
    {
        t = 0;
        for (int j = 0; j <= len; ++j)
        {
            ans[j] *= 2;
            ans[j] += t;
            if (ans[j] >= 10)
            {
                       t = 1;
                       ans[j] -= 10;
            }
            else
            {
                t = 0;
            }
        }
        ans[len + 1] += t;
        if (ans[len + 1] != 0) ++len;
    }
    for (int i = len; i >= 0; --i)
      cout << ans[i];
    return 0;
}
int main()
{
    int i, j, n;
    cin >> n;
    if (n == 0)
    {
        cout << 1 << endl;
    }
    else
    {
       int num[51] = {0};
       num[0] = 01;
       for (i = 1; i <= n; i++)
       {
            for (j = 0; j < 50; j++)
            {
                 num[j] = 2 * num[j];
            }
            for (j = 0; j < 50; j++)
            {
                if (num[j] >= 10)
                {
                    num[j+1] += 1;
                    num[j] -= 10;
                }
            }
       }   
       i = 50;
       while (num[i] == 0)
       {
              i--;
       } 
       for (; i >= 0; i--)
       {
           cout << num[i];
       }
    }
    return 0;
}
/*
 *?????
 *???2010 - 12 - 20
 *?????????  ??2?N??
 */
void power(char str[35],int);
int g_count = 0;                            //??????????2?????N??????
int main()
{
	char str[35];
	int i,n,j;
	cin >> n;
	for(i = 0; i <= 34; i++)               //?????????2??????000000001
		str[i] = '0';
	str[34] = '1';
	power(str,n);
	return 0;
}
void power(char str[35],int n)
{
	int i,j;
	if(g_count == n)
	{
		for(i = 0; i <= 34; i++)
			if(str[i] != '0')                  //???????????????????
			{
				for(j = i; j <= 34; j++)
					cout << str[j];
				return;
			}
	}
	char line[35];
	for(i = 0; i <= 34; i++)
		line[i] = '0';
	for(i = 34; i >= 0; i--)
	{
		if((str[i] - '0') * 2 > 9)
		{
			line[i - 1]++;
			line[i] += (str[i] - '0') * 2 - 10;
		}
		if(((str[i] - '0') * 2 < 9)&&(str[i] < '9'))
			line[i] += (str[i] - '0') * 2;
	}
	g_count++;
	power(line,n);
}
int main()
{
	int i,j,k,b;
	int m[10000]={0};
	int n;
	cin>>n;
	if(n==0)
		cout<<1;
    if(n==1)
		cout<<2;
	if(n>1){
		m[0]=2;
for(i=1;i<=n-1;i++)
	{for(j=0;j<9999;j++)
	  m[j]=m[j]*2;
	for(j=0;j<9999;j++)
		if(m[j]>9)
		{
			m[j]=m[j]%10;
			m[j+1]++;
		}


	}
for(i=9999;i>=0;i--)
	if(m[i]!=0)
		{k=i;break;}
for(b=k;b>=0;b--)
		cout<<m[b];}
 return 0;
}
int main()
{
	int s[50],i,n,j,p=0,q=0,c;
	for(i=0;i<=50;i++)
	{
		s[i]=-1;
	}
	s[0]=1;
	scanf("%d",&n);
	for(j=1;j<=n;j++)
	{
	   for(i=0;s[i]!=-1;i++)
	   {c=s[i]*2;
	   s[i]=c%10+p;
	   if(c>=10)
	   {
   		p=1;
   	   }
   	   else p=0;
   		
	   }
	   if(p!=0)
	   s[i]=1;
	   p=0;
   		
   		
   	}
   	for(i=0;s[i]!=-1;i++)
   	{
	   	q++;
	   }
	   for(i=q-1;i>=0;i--)
	   {printf("%d",s[i]);}
return 0;
}
int main(){
    int array[1000],i,j,add=0,head,n;
    scanf("%d",&n);
    array[0]=1;
    head=1;
    for (i=0;i<n;i++)
    {
        for (j=0;j<head;j++)
        {
        array[j]=add+array[j]*2;
        add=0;
        if (array[j]>=10)
        {
         add=array[j]/10;
         array[j]=array[j]%10;         
         if (j+1==head)
         {
         array[head]=add;
         add=0;
         head++;    
         break;     
         }     
        }}
    }
    for (i=head-1;i>=0;i--)
        printf("%d",array[i]);
    return 0;
}
int main()
{
	int a[55];
	memset(a,-1,55*sizeof(int));
	int n;
	cin>>n;
	a[0]=1;
	while(n>0)
	{
		int i,yu=0,ji=0;
		for(i=0;;i++)
		{
			if(a[i]==-1){a[i]=a[i]+yu*2;break;}
			else
			{
				ji=a[i]*2;
				ji=ji+yu;
				a[i]=ji%10;
				if(ji>9)yu=1;
				else yu=0;
				
				
			}

		}
		n--;
	}
	int i=0;
	while(a[i]!=-1)i++;
	i--;
	while(i>-1){cout<<a[i];i--;}

	return 0;
}
int main()
{
	int n, i = 0, x, y, m;
	char s[300], a[300];
	cin >> n;
	s[0] = '1';
	for(;n > 0;n--)
	{
		x = y = 0;
		m = i + 1;
		m--;
		for(i = 0; i <= m; i++)
		{
			y = x + (s[m - i] - '0') * 2;
			a[i] = y % 10 + '0';
			x = y / 10;
		}
		if(x != 0)
			a[i] = x + '0';
		else
			i--;
		for(m = 0; m <= i; m++)
			s[m] = a[i - m];
	}
	for(m = 0; m <=i ; m++)
		cout << s[m];
	return 0;
}
int main(int argc, char* argv[])
{
   double n,i,k=1;
   scanf("%lf",&n);
   if(n==0){
	   printf("1");
   }else{
	   for(i=0;i<n;i++){
           k=2*k;
	   }
       printf("%.0lf",k);
   }
	return 0;
}
//***************************************************
//*    name: 5.cpp                                  *
//*    author:??                                  *
//*    date: 2013-11-16                             *
//*    description: ??2?N??                    *
//***************************************************
int main ()
{
	int n , i , j , num[100] ={0};
	cin >>n ;
	num[0] = 1 ;//?1???
	for(i = 0 ; i < n ; i++)
	{
		for (j = 0 ; j < 100 ; j++)
			num[j] = num[j] * 2 ;//
		for (j = 0 ; j < 100 ; j++)
		{
			if(num[j] >= 10)
			{
				num [j]= num[j]-10;
				num [j+1]++ ;
			}
		}
	}
	for(j = 99 ; j >= 0 ; j--)
	{
		if(num[j] == 0)
			continue ;
		break ;
	}
	while (j >= 0)
	{
		cout << num [j];
		if(j % 50==0)
			cout << endl;
		j-- ;
	}
	return 0 ;
}
int main()
{
 	int N, i = 1; //N????N??, i????? 
	int result[40]= {0}; //result????,2?100??????40?? 
	
	cin >> N;
	result[0] = 1; //2?0???1 
	
	while ( i <= N )
	{
	 	  for ( int j = 0; j < 39; j++ )
	 	  {
 	  	   	  result[j] *= 2; //?????2 
 		  }
 		  
 		  for ( int k = 0; k < 39; k++ )
 		  {
 	  	   	  if ( result[k] >= 10 )
 	  	   	  {
 			   	 result[k+1] += result[k] / 10; //??
				 result[k] %= 10; //????????? 
		   	  }
 		  }
 	 	  i++;
 	}
	
 	i = 39; //??????????????????result 
	
	while ( result[i] == 0 )
	{
 	 	  i--; //??????? 
 	}
	 
    for ( int k = i; k >= 0; k-- )
	 	 cout << result[k]; //????result
	
	return 0; 
}
/*
 * 3.cpp
 *
 *  Created on: 2013-1-13
 *      Author: i
 */
int main(){
	int num[40]={1},temp[40]={1},n,i;
	cin>>n;
	while(n--){
		for(i=0;i<40;i++){
			if(num[i]==0&&num[i+1]==0&&num[i+2]==0)break;
			if(num[i]+temp[i]>9){
				temp[i+1]++;
				temp[i]=num[i]+temp[i]-10;
			}
			else{
				temp[i]=num[i]+temp[i];
			}
		}
		for(i=0;i<40;i++){
			num[i]=temp[i];
		}
	}
	n=0;
	for(i=39;i>=0;i--){
		if(n)cout<<num[i];
		else if(num[i]!=0){
			cout<<num[i];
			n++;
		}
	}
	cout<<endl;
	return 0;
}
int main()
{
	int N,num[110]={0},an[110]={0},i;
	num[0]=1;an[0]=1;
	cin>>N;
	while(N--)
	{
		memset(an,0,sizeof(an));
		for(i=0;i<110;i++)
			an[i]=num[i]*2;

		for(i=0;i<110;i++) 
		{
			if(an[i]>=10)
			{
				an[i+1]+=an[i]/10; 
				an[i]=an[i]%10;
			}
		}
		for(i=0;i<110;i++)
			num[i]=an[i];
	}
	if(an[0]==1)
		cout<<1<<endl;
	else
	{
		i=105;
		while(an[i]==0&&i>=0)  //???????0???
			i--;
		for(;i>=0;i--)
			cout<<an[i];  //??????????????
		cout<<endl;
	}
	cin.get();cin.get();
	return 0;
}
int main(int argc, char *argv[])
{
  int i,j,k=1,n;
  int b[100]={0};
  scanf("%d",&n);
  b[99]=1;
  for(i=0;i<n;i++)
  {
      for(j=99;j>=0;j--)
      b[j]=b[j]*2;
      
      for(j=99;j>=0;j--)
      {
            if(b[j]>9)
            {b[j]=b[j]-10;
            b[j-1]++;}
      }
  }
  for(i=0;i<100;i++)
  {
      if(b[i]>0)
      break;
  }
  for(j=i;j<100;j++)
  printf("%d",b[j]);
  return 0;
}
int a[100000],b[1000000];

int main()
{
	int n,i,j,cnt=1;
	cin>>n;
	for(i=0;i<10000;i++)
	{
		a[i]=0;
		b[i]=0;
	}
	a[0]=1;
	for(i=0;i<n;i++)
	{
		for(j=0;j<100000;j++)
		{
			a[j]=a[j]*2+b[j];
			if(a[j]>=10)
			{
				a[j]-=10;
				b[j+1]++;
			}
		}
		for(j=0;j<10000;j++)
			b[j]=0;
		
	}
	j=100000;
	while(a[j]==0)
		j--;
	for(;j>=0;j--)
		cout<<a[j];
	return 0;
}
int main ()
{
	int a[10000]={0};
	int n;
	cin>>n;
	a[0]=1;
	if(n==0)
	{
		cout<<'1';
	}
	int jinwei=0;
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=10000;j++)
		{
			a[j-1]=a[j-1]+a[j-1]+jinwei;
			if(a[j-1]>9)
			{
				a[j-1]=a[j-1]-10;
				jinwei=1;
			}
			else
			{
				jinwei=0;
			}
		}
	}
	int len;
	for(int i=10000;i>0;i--)
	{
		if(a[i-1]!=0)
		{
			len=i;
			break;
		}
	}
	if(n!=0)
	{
		for(int i=len;i>0;i--)
		{
			cout<<a[i-1];
		}
	}
	return 0;
}
int main()
{
	int n, num[35], i, j;
	memset(num, 0, sizeof(num));
	cin >> n;
	num[0] = 1;
	for(i = 0; i < n; i++)
	{
		for(j = 0; j < 35; j++)
			num[j] *= 2;
		for(j = 0; j < 35; j++)
		{
			if(num[j] >= 10)
			{
				num[j + 1] += num[j] / 10;
				num[j] = num[j] % 10;
			}
		}
	}
		i = 34;
		while(num[i] == 0)
		i--;
		for( ; i >= 0; i--)
		cout << num[i];
		cout << endl;
	return 0;
}
int aa[1000],ab[1000];
void cheng(int a1[],int a2[])
{  int i,j;
   for(i=0;i<=999;i++)
   { a2[i]=a2[i]+a1[i]*2;
    if(a2[i]>9)
	{ a2[i]=a2[i]-10;
	a2[i+1]++;}
	
   }
   return;
}
void copy(int a1[],int a2[])
{ int i;
 for(i=0;i<=999;i++)
 { a1[i]=a2[i];}
 return;}


int main( )
{
    int i,k,m,n,a,t1,t2;
	cin>>n;
	if(n<=20)
	{a=1;
	for(i=1;i<=n;i++)
	{ a=a*2;}
	cout<<a;}
	else {
		memset(aa,0,sizeof(aa));
		memset(ab,0,sizeof(ab));
		aa[0]=1;
        for(k=1;k<=n;k++)
		{
			cheng(aa,ab);
			copy(aa,ab);
			memset(ab,0,sizeof(ab));
		}
		
	k=999;
		while (aa[k]==0) k--;
		for(;k>=0;k--)
			cout<<aa[k];
	}
	return 0;
}
int main()
{
	int N;
	int start;
	scanf("%d",&N);
	if(N==1)
	{
		printf("2");
		return 0;
	}
	int sz[51];
	for(int i=1;i<=50;i++)
	{
		sz[i]=0;
	}
	sz[1]=1;
	
	for(int j=1;j<=N;j++)
	{
		for(int p=1;p<=50;p++)
		{
			sz[p]=2*sz[p];
		}
		for(int q=1;q<=50;q++)
		{
			if(sz[q]>9)
			{
				sz[q+1]=sz[q+1]+1;
				sz[q]=sz[q]-10;
			}
		}
	}
	for(int k=50;k>=1;k--)
	{
		if(sz[k]!=0)
		{
			start=k;
			break;
		}
		
	}
	for(int l=start;l>=1;l--)
	{
		printf("%d",sz[l]);
	}
	return 0;
}
/*************************************
*file 5.cpp                     ******
*author ???                    ****
*date 2013-11-19                   ***
*description 2?n??                *
*************************************/
int main()
{
	int n;
	cin >> n;      //?????
	int c[200] = {0};  //??????????
	c[0] = 1;          //??2?0?????
	int i, j, k;
	int m = 0;          //??????????????-1
	for(i = 1; i <= n; i++)
	{

		//????
		for(j = 0; j <= m; j++)
		{
			c[j]*=2;          //?????????2?
		}

		//????
		for(j = 0; j <= m; j++)  //??????
		{
			if(c[j] >= 10)
			{
				c[j]-=10;
				c[j + 1]++;
			}
		}
		if(!c[m + 1])    //???m??????????0? 
			m++;        
	}
	int o = 0;        //0????????????
	for(i = 199; i >= 0; i--)
	{
		if(c[i])      //???????
		{
			cout << c[i];
			o = 1;
		}
		else if(o)    //??????????????????
			cout << c[i];
	}
	cout << endl;
	return 0;
}
int main ( )
{
	int N, i, j, t = 0, exp[1000] = {2, 0};
	cin >> N;
	if(N==0)
		cout <<1<<endl;
	else
	{
	for(i = 1;i < N;i++)
	{
		t = 0;
		for(j = 0;;j++)
		{

		    if(exp[j+1]==0 && exp[j+2]==0 && exp[j+3]==0)
			{
				exp[j] = 2*exp[j]+t;
				t = exp[j]/10;
				exp[j] = exp[j] - 10*t;
				exp[j+1] = t;
				break;
			}
			else
			{
			if(j==0)
			{
				t = 2*exp[j]/10;
			    exp[j] = 2*exp[j] - 10*t;                                                                                                                                                                                                                                                                 
			}
			else
			{

				exp[j] = 2*exp[j]+t;
				t = exp[j]/10;
				exp[j] = exp[j] - 10*t;
			}
			}
		}
	}
	for(i = 999;i >= 0;i--)
	{
		if(exp[i]!=0)
			break;
	}
	for(;i >=0;i--)
	{
		cout << exp[i];
	}
	}
	return 0;
}
//****************************************************************
// ????1000012789_2.cpp                                      *
// ???wusy                                                    *
// ???12,15                                                   *
// ???2?N?                                                  *
//****************************************************************
int main()
{           
	int a[50], n, i, j;
	cin >> n;

	memset(a, 0, sizeof(a));
	a[0] = 1;
	for (i = 0; i < n; i++)
	{
		for(j = 0; j < 50; j++)
			a[j] = a[j] * 2;
		for(j = 0; j < 50; j++)
		{
			if(a[j] >= 10)
			{
				a[j + 1] = a[j + 1] + a[j] / 10;
				a[j] = a[j] % 10;
			}
		}
	}
	for (i = 49; i >= 0; i--)
		if (a[i] != 0)
			break;
	for (; i >=0; i--)
		cout << a[i];
	return 0;
}
int a[105][105] = {0};
int main()
{
	int n;
	int len = 0;
	int i,j;
	int flag;
	cin >> n;
	a[1][1] = 2;
	for( i = 1; i<= n -1 ; i++)
	{
		for(j = 1; j <= n; j++)
		{
			a[i+1][j] = (a[i][j] * 2 + a[i+1][j]) % 10;
			a[i+1][j+1] = (a[i][j] * 2 / 10 + a[i+1][j+1]) % 10;
			
		}
	}

	for(i = n ; i >= 1; i--)
	{
		if(a[n][i] != 0)
		{
			flag = 1;
			len = i;
			break;
		}
	}
	for(i = len; i >= 1; i--)
		printf("%d",a[n][i]);
	
	if(n == 0)
	{
		printf("1\n");
	}
	

	return 0;
}
//**********************
//* 2.cpp 



int main()
{
	int a[35] = {0}, m, i, j, p = 0;
	int b[35] = {0};
	cin >> m;
	a[34] = 1;
	for (j = 1; j <= m; j++)
	{
		for (i = 34; i >= 1; i--)
		{
			b[i] = a[i] * 2 % 10 + b[i];
			b[i - 1] = a[i] * 2 / 10 + b[i - 1];
		}
		for (i = 0; i <= 34; i++)
		{
			a[i] = b[i];
			b[i] = 0;
		}
	}
	for (i = 0; i <= 34; i++)
	{
		if (a[i] != 0)
			p = 1;
		if (p == 1)
			cout << a[i];
	}
	return 0;
}
int a[35],b[35],c[35],d[35];
void jiaziji();
int main ()
{
    int n=0;
    cin>>n;
    for (int i=0;i<35;i++)
    {
        a[i]=0;
        b[i]=0;
        c[i]=0;
        d[i]=0;
    }
    a[34]=1;b[34]=1;
    for (int i=0;i<n;i++) jiaziji();
    if (n==0) cout<<'1'<<endl;
    else//????????????? 
    {
        int p=0;
        for (int i=0;i<35;i++)
        {
            if (c[i]!=0) 
            {
                p=i;
                break; 
            }
        }
        for (int i=p;i<35;i++)
        {
            cout<<c[i];
        }
    }
    
    return 0;
}

void jiaziji()//????????????????? 
{
     for (int i=34;i>0;i--)//c????????d???????a?b????????????? 
     { 
         c[i]=a[i]+b[i]+d[i];
         if (c[i]>9) //???? 
         {
              c[i]-=10;
              d[i-1]+=1;
         }
     }
     for (int i=0;i<35;i++)//????????????????????a?b???d???? 
     {
         a[i]=c[i];
         b[i]=c[i];
         d[i]=0;
     }
}
int main()
{
	int n , len = 1;   
	int num [50]  = { 0 }, *p = num , carry = 0;   
	num [ 0 ] = 1;
	cin >> n;
	while ( n -- )
	{
		p = num;
		carry = 0;
		while ( p < num + len )
		{
			*p *= 2;
			*p += carry;
			carry = 0;
			while ( *p > 9 )   
			{
				carry ++;
				*p -= 10;
			}
			p ++;
		}
		if ( carry )     
		{
			len ++;
			*p = carry;
		}
	}
	if ( *p == 0 )     
		p --;
	while ( p >= num )    
	{
		cout << *p;
		p --;
	}
	return 0;
}
int result[ 50 ] = { 1 } ; 

void power2( int n ) ;

int main()
{
	int n ;

	cin >> n ;

	power2( n ) ;

	return 0 ;
}

void power2( int n )
{
	int i , j = 0 ;

	for( i = 0 ; i < 50 ; i ++ )
		result[ i ] = result[ i ] * 2 ;

	for( i = 0 ; i < 50 ; i ++ )
		if( result[ i ] >= 10 )
		{
			result[ i + 1 ] = result[ i + 1 ] + result[ i ] / 10 ;
			result[ i ] = result[ i ] % 10 ;
		}

	if( n == 1 )
	{
		i = 50 - 1 ;

		while( result[ i ] == 0 )
			i -- ; //???????0??

		for( ; i >= 0 ; i -- )
			cout << result[ i ] ; //??????

		cout << endl ;

		return ;
	}

	else
	{
		if( n == 0 )
		{
			cout << 1 ;
			return ;
		}
		else
			power2( n - 1 ) ;
	}
}
int main()
{
	int n,i,j,t;
	int a[100],b[100];
	cin>>n; 
	for(i=0;i<100;i++)
	{
		a[i]=0;
		b[i]=0;
	}
	a[0]=1;
	for(i=0;i<n;i++)
	{
		for(j=0;j<99;j++)
		{
			b[j+1]=(a[j]*2)/10;
			a[j]=(a[j]*2)%10+b[j];
			b[j]=0;
		}
	}
	for(i=99;i>=0;i--)
	{
		if(a[i]!=0)
		{
			t=i;
			break;
		}
	}
	for(i=t;i>=0;i--)
	{
		cout<<a[i];
	} 
	return 0;
}
/*
 * jisuan2deNcifang.cpp
 *
 *  Created on: 2013-1-11
 *      Author: 120001791??
 *      ???
 */
int main() {
	int N = 0, i = 0, n = 0, r = 0, temp = 0;//5????????N?????r????
	int a[35];//1????????????
	cin >> N;//??N
	memset(a, 0, sizeof(a));//a??
	a[0] = 1;//????1
	while (N--) {//N????
		for (i = 0; i < 35; i++) {//???????
			temp = r;//????
			r = (a[i] * 2 + r) / 10;//??????
			a[i] = (a[i] * 2 + temp) % 10;//????
		}
	}
	for (n = 34; a[n] == 0; n--)
		;//?????0
	for (; n >= 0; n--)//???
		cout << a[n];//????
	return 0;
}
int main()
{	
	int num[101][100];
	int i, j, n;
	for (i = 0; i < 100; i ++)
		for (j = 0; j < 101; j ++)
			num[j][i] = 0;
	num[0][0] = 1;
	cin >> n;
	for (i = 1; i <= n; i ++)
	{
		for (j = 0; j < 90; j ++)
		{
			num[i][j] += 2 * num[i - 1][j];
			if (num[i][j] > 9)
			{
				num[i][j + 1] += num[i][j] / 10;
				num[i][j] = num[i][j] % 10;
			}
		}
	}
	i = 90;
	while (num[n][i] == 0)
		i --;
	for (j = i; j >= 0; j --)
		cout << num[n][j];
	cout << endl;
	return 0;
}
void cheng (char *a)
{
	int t,w[100]={0},i,k,j=0,s=0;
	t=strlen(a);
	for(i=t-1;i>=0;i--)
	{
		w[j]=a[i]-'0';
		w[j]=2*w[j];
		j++;
	}

	
	for(i=0;i<=t-1;i++)
	{
		w[i+1]=w[i]/10+w[i+1];
		w[i]=w[i]%10;
	}
j=90;
while(w[j]==0)j--;

for(i=j;i>=0;i--)
	{
		a[s]=w[i]+'0';
		s++;
	}
}
int main()
{

	int n,i,s;
	char a[100]={'1'};
	
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cheng(a);
	}
	s=strlen(a);
for(i=0;i<=s-1;i++)
	{
		cout<<a[i];
	}
	return 0;
}
int main()
{
int n,i;
cin>>n;
int a[40]={0};
a[0]=1;
while(n)
{
	int j=0;
	for(i=0;i<40;i++)
	{
		a[i]=2*a[i]+j;
		j=0;
		if(a[i]>9)
		{
			a[i]=a[i]-10;
			j=1;
		}
	}
	n--;
}
for(i=39;i>=0;i--)
	if(a[i]!=0)
		break;
for(;i>=0;i--)
	cout<<a[i];
return 0;
}
//****************************************************** 
//* ? ? ?   ?? ? 2 ? N ? ?                    *
//* ? ?      ?? ? ?                              *
//* ? ? ? ??2010 ? 12 ? 17 ?                   * 
//* ? ? ? ??? ? 2 ? N ? ?                    *
//* ? ?      ?1000010439                            *
//******************************************************
int b[1000] = {0};                              //????????,?????????,?????? 
int L = 1;
void highcal(int n,char a[],int l)              //???????????????? 
{
	int i,g = 0;
	if(n == 0);                                 //?????????,???????? 
	else
	{
		g = 0;
		for(i = 0;i < l;i++)                    //???????????? 
		{
			b[i] = a[i] -'0';
			b[i] = b[i] * 2;                    //???????2,??????????? 
		}
		for(i = 0;i < l;i++)
		{
			if(b[i] > 9)                        //?????? 
			{
				b[i] = b[i] -10;                //???? 
				b[i + 1]++;
			}
			a[i] = b[i] + '0';                  //?????? 
		}
		if(b[l] != 0)                           //????2???????,????1,???1 
		{
			a[l] = '1';
			L = l + 1;
			g = 1;                              //??? 
		}
		if(g == 1)                              //???????????1 
			highcal(n - 1,a,l + 1);
		else
			highcal(n - 1,a,l);                 //?? 
	}
}
int main()
{
	char a[1000];                               //????? 
	int n,i,l;                                  //n??????2??? 
	int sum = 1;                                //sum???? 
	cin >> n;
	a[0] = '1';                                 //????1 
	l = 1;
	highcal(n,a,l);                             //???? 
	for(i = L - 1;i >= 0;i--)                   //???????? 
	cout << a[i];
	return 0;
}
char c1[101]={'\0'};//??????
char c2[101]={'\0'};//??????
char c3[101]={'\0'};//??
int main()
{
	void cal(int);
	int n,i;
	cin>>n;
	c1[0]='1';//???????1
	cal(n);
	char c[100]={'\0'};
	for(i=0;i<strlen(c1);i++)
		c[i]=c1[strlen(c1)-i-1];//?????
	cout<<c;
	return 0;
}
void cal(int n)
{
	int i;
	if(n!=0)
	{
		for(i=0;c1[i]!='\0';i++)
		{
			if((c1[i]-'0')*2>=10)
			{
				c2[i]=(c1[i]-'0')*2-10+'0';
				c3[i+1]='1';            //???1
			}
			else
			{
				c2[i]=(c1[i]-'0')*2+'0';
				c3[i+1]='0';
			}
		}
		for(i=1;c3[i]!='\0';i++)
		{
			if(c2[i]!='\0')
				c2[i]=c2[i]+c3[i]-'0';           
			else if(c3[i]=='1') c2[i]=c3[i];            //???????????????
		}
		strcpy(c1,c2);
		cal(n-1);
	}
}
int main()
{
	char answer[100];
	for(int i=0; i<100; i++) answer[i]='0';
	answer[0]='1';
	int num;
	cin>>num;

	int flag=0;
	while(num>0)
	{
		for(int i=0; i<=80; i++)
		{

			answer[i]=answer[i]+answer[i]-48;
			if(flag==1)
			{
				flag=0;
				answer[i]++;
			}
			if(answer[i]>'9') 
			{
				flag=1;
				answer[i]=answer[i]-10;
			}

		}
		num--;
	}  
	int i=80;
	while(answer[i]=='0')
	{   i--;

	}
	for(int j=i; i>=0; i--)
	{


		cout<<answer[i];
	}
	cout<<endl;
	return 0;
}
/*	???:2?N??
	???:1000012896 leo
	??:2010.12.17
	????:??2?N??
	*/
int main()
{
	int num[31]={0}, N, i, j, flag;
	num[30] = 1;
	cin >> N;
	for (i = 1; i <= N; i++)
	{
		flag = 0;
		for (j = 30; j >= 0; j--)
		{
			if (num[j] * 2 + flag >= 10)
			{
				num[j] = num[j] * 2 + flag - 10;
				flag = 1;
			}
			else
			{
				num[j] = num[j] * 2 + flag;
				flag = 0;
			}
		}
	}
	for (i = 0; i <= 30; i++)
		if (num[i] != 0)
			break;
	for (; i <= 30; i++)
		cout << num[i];
	return 0;
}
int main()
{
	int n,i,j,k = 0,flag = 0;
	int num[1000]={0};
	cin >> n ;
	num[0] = 1;
	for (i = 1; i <= n; i ++)
	{
		
		for (j = 0 ; j <= k; j ++)
		{
			num[j] = num[j] * 2 + flag;
			flag = 0;
			if (num[j] >= 10)
			{
				num[j] = num[j] - 10;
				flag = 1;
			}
		}
		if (flag == 1)
		{
			k ++;
			num[k] = 1;
			flag = 0 ;
		}
	}
	for ( i = k ; i >=0 ; i -- )
		cout << num[i];
	return 0;

}
int main()
{
	int num[1000]={0},k=0,i=0,j=0,s=0;
	num[0]=1;
	cin>>k;
	for(i=0;i<k;i++)
	{
		for(j=0;j<1000;j++)
			num[j]*=2;
		for(j=0;j<1000;j++)
		{
			num[j+1]+=num[j]/10;
			num[j]=num[j]%10;
		}
	}
	for(i=999;i>=0;i--)
	{
		if(num[i]!=0)s++;
		if(s>0)cout<<num[i];
	}
	return 0;
}
/* Name        : ??2?N??
 * Version     : 1.0
 * Date        : 2013-01-11
 * New         : 
 * Description : 
 * State       : Design
 */
int main()
{
    int Num[35]={1},Jinwei[35]={0};
    int N=0;
    cin>>N;
    for (int k=0;k<N;k++)
    {
        for (int i=0;i<33;i++)
        {
            Num[i]=Num[i]*2+Jinwei[i];
            if (Num[i]>9) Num[i]=Num[i]-10,Jinwei[i+1]=1;
            else Jinwei[i+1]=0;
        }
    }
    for (int i=34,Begin=0;i>-1;i--)
    {
        if (Num[i]!=0||Begin==1) cout<<Num[i],Begin=1;
    }
    return 0;
}
int main()
{
	int n,flag=0,count=0,j,i=0,sum[100]={1};
	cin>>n;
	for(i=0;i<n;i++)
	{
		flag=0;
		for(j=99;j>=0;j--)
		{
			if(sum[j]==0&&flag==0)
				continue;
			else
				flag=1;
			sum[j]*=2;
			if(sum[j]>=10)
			{
				sum[j]-=10;
				sum[j+1]+=1;
			}
		}
	}
	for(i=99;i>=0;i--)
	{
		if(sum[i]!=0)
		{
			for(j=i;j>=0;j--)
			{
				cout<<sum[j];
			}
			cout<<endl;
			break;
		}
	}
	return 0;
}
int main ()
{
	int N ;
	cin >> N ;
	double result[100] = { 1 , -1 } ;
	for ( int i = 1 ; i <= N ; i++ )
	{
		int k = 0 ;
		while ( result[k+1] >= -0.5 )//????????
		{
			result[k] = result[k] * 2 ;
			if ( result[k] > 9 )//????9??????
			{
				result[k+1] = result[k+1] + 0.5 ;
				result[k] = result[k] - 10 ;
			}
			k++ ;
		}//??[k]???????
		result[k] = result[k] * 2 ;
		if ( result[k] > 9 )//????9??????
		{
			result[k+2] = -1 ;
			result[k+1] = 1 ;
			result[k] = result[k] - 10 ;
		}
		//????9?????
	}
	int point = 0 ;
	while ( result[point+1] >= -0.5 )
		point++ ;
	while ( point >= 0 )
		cout << result[point--] ;
	cout << endl ;

	return 0 ;
}