semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int a[120] = {0};
	int n,i;
	a[0] = 1;
	cin >> n;
	while( n --)
	{
		for ( i = 0; i < 100; i ++)
		{
			a[i] = a[i] * 2;
		}
		for ( i = 0; i < 100; i ++)
		{
			if ( a[i] > 9) 
			{
				a[i+1] += 1;
				a[i] = a[i] % 10;
			}
		}
	}
	
	for ( i = 100; i >= 0; i --)
	{
		if ( a[i] != 0)  break;
	}
	for ( ; i >= 0; i --)
	{
		cout << a[i];
	}
	return 0;
}
int main()
{
	int n,i,j,k=0,flag1,flag2;
	cin>>n;
	char c[200];
	c[0]='1';
	for(i=1;i<200;i++)
	{
		  c[i]='0';
    }
	
	for(i=1;i<=n;i++)
	{
		flag1=0,flag2=0;
	   for(j=0;j<=k;j++)
		{
			if(c[j]-'0'<5)
			{
				c[j]=2*c[j]-'0'+flag2;
				flag2=0;
			}
			else if(c[j]-'0'>=5)
			{
				c[j]=(2*(c[j]-'0'))%10+'0'+flag2;
				flag2=1;
				if(j == k)
					flag1 = 1;
			}
		}
	   if( flag1 ) 
	   {
			   k++;
			   c[k]='1';
	   }
	   
	}
	for(i=0;i<=k;i++)
	   {
		   cout<<c[k-i];
	   }
	return 0;
}
void f(int);
char mul[10000];
int main()
{
	int k, len, i;
	cin >> k;
	mul[0] = 2 + '0';
	if (k == 0)
	{
		cout << 1;
		exit(1);
	}
	f(k);
	len = strlen(mul);
	for (i = len - 1; i >= 0; i--)
		cout << mul[i] - '0';
	cout << endl;
	return 0;
}
void f(int k)
{
    int len, i;
	char mul_save[10000] = {0};
	if (k == 1)
		return ;
	else
	{
		len = strlen(mul);
		for (i = 0; i < len; i++)
		{
			mul_save[i] = (mul[i] - '0') * 2 + '0';
		}
		for (i = 0; i < len; i++)
		{
			if (mul_save[i] >= 10 + '0' && i != len - 1)
			{
				mul_save[i] -= 10;
				mul_save[i + 1]++;
			}
			else if(mul_save[i] >= 10 + '0')
			{
				mul_save[i] -= 10;
				mul_save[len] = 1+'0';
			}
		}
		if (mul_save[len] != 0)
			mul_save[len + 1] = 0;
		strcpy(mul, mul_save);
		f(k - 1);
	}
}
int main()
{
    int n,t,i,j;
    int a[200],b[200],length=1;
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    a[0]=2;
    cin>>n;
   if(n==0) cout<<1;
   else
  {  
    for(t=1;t<n;t++)
       {
         for(i=0;i<=length-1;i++)
         {
           b[i]=a[i]*2+b[i];
           if(b[i]>=10)
              { b[i+1]=b[i+1]+1; b[i]=b[i]-10;}
         }
       for(i=199;i>=0;i++)
         if(b[i]!=0)
          {length=i;break;}
       for(i=0;i<=199;i++)
          {a[i]=b[i];b[i]=0;}
       }
    for(i=199;i>=0;i--)
     if(a[i]>0)
       break;
    for(j=i;j>=0;j--)
      cout<<a[j];}
      
      return 0;
}
//?????????100?????


int main()
{
	int result[80]={0};  //????
	//???????????????????????????OTZ?
    int l=1;   //??
    int c;     //????????
    int n;     //??
    int i,j;
    scanf("%d",&n);
    if(n<=30)
    {
    	c=(int)pow(2,n);
    	printf("%d",c);
    	return 0;          //????????????=u=+
    }
   //if(n==100)
   //{
   //     printf("1267650600228229401496703205376");
   //     return 0;
   // }
    result[0]=1;   //2?0??
    for(i=0;i<n;i++)  //???2
    {
        c=0;  //??????
        for(j=0;j<l;j++)   //??????
        {
            result[j]=result[j]*2+c;
            c=result[j]/1000;     //??
            if(result[j]>=1000)   //????
            {
            	result[j]=result[j]%1000;   //??
                if(j==l-1)  //?????
                {
    	            l++;   //?+1
                }
             }
         }
    }
    for(i=l-1;i>=0;i--)   //??
    {
    	if(i!=l-1)  //??
    	{
            printf("%.3d",result[i]);
            continue;
    	}
    	printf("%d",result[i]);
    }
printf("\n");
    return 0;
}
int main()
{
	int N,i,j,t;
	int a[100]={0};
	cin>>N;
	a[0]=1;
	t=0;
	for(i=0;i<N;i++)
	{
		for(j=0;j<100;j++)
		{
			a[j]=a[j]*2;
			a[j]=a[j]+t;
			t=0;
			if(a[j]>9)
			{
				a[j]=a[j]-10;
				t=1;
			}
		}
	}
	for(i=99;i>=0;i--)
	{
		if(a[i]>0)
		{
			t=i;
			break;
		}
	}
	for(i=t;i>=0;i--)
	{
		cout<<a[i];
	} 
	return 0;
}
int main()
{
    int n, i = 0, k;
    cin >> n;
    int num[40] = {0};
    int mirror[40] = {0};
    num[39] = 1;
    mirror[39] = 1;
    if (n == 0)
        cout << 1 << endl;
    else
    {
        for (i = 1; i <= n; i++)
        {
            for (k = 39; k >= 0; k--)
            {
                num[k] = num[k] + mirror[k];
                if (num[k] >= 10)
                {
                    num[k] = num[k] - 10;
                    num[k - 1]++;
                }
            }
            for (k = 0; k <= 39; k++)
                mirror[k] = num[k];
        }
        k = 0;
        while (num[k] == 0 )
            k++;
        for (k; k <= 39; k++)
            cout << num[k];
        cout << endl;
    }
    return 0;
}
int a[1005];
int main()
{
 a[0] = 1;
 int  l = 1,n,t = 0,i;
 scanf("%d",&n);
 while(n--)
 {
  for(i = 0;i < l; i++)
     a[i]*=2;   
   for(i = 0;i < l; i++)
   {
     if(a[i]>=10)
     {
      a[i+1] += a[i] / 10;
      a[i] %= 10;
     }
   }
   
   while(a[l])
   {
     if(a[l]>=10)
     {
      a[l+1] += a[l]/10;
      a[l] %= 10;
     }          
     l++;
   }
 }
 for(i = l-1;i >= 0; i--)
 printf("%d",a[i]);
 
 return 0;    
}
/*
??2?N??
Author:??
Number:1000012913
Date: 2010-12-15
*/

//?g_ans[i]?char???int

//?int???char

//??????????????
char g_ans[1000];

int main()
{

	//??????????
	int n;
	cin >> n;

	//????????????1
	memset(g_ans, 0,sizeof(g_ans));
	g_ans[0] = '1';

	//n??????,i?????
	int n_len, i;

	//n??2
	while (n--)
	{

		//?????????????????2
		n_len = strlen(g_ans);
		for (i = 0; i != n_len; i++)
			g_ans[i] = itoc(ctoi(i) * 2);

		//??????
		for (i = 0; i != n_len; i++)

			//?????
			if (g_ans[i] > '9')
			{

				//?????10
				g_ans[i] -= 10;

				//?????????????????
				if (g_ans[i + 1])

					//????1
					g_ans[i + 1]++;

				//??????????????0????'\0'?
				//????????1
				else
					g_ans[i + 1] = '1';
			}
	}

	//???????????????????????
	char *pt = &g_ans[strlen(g_ans) - 1];
	while (pt != &g_ans[-1])
		cout.put(*pt--);
	cout << endl;
	return 0;
}
int num[1000]={0};
int jinwei[1000]={0};
int weishu=1;
int temp;
void multiply()
{
	int i;
	for (i=0;i<=weishu;i++)
	{
		temp=num[i]*2;
		num[i]=temp%10+jinwei[i];
		jinwei[i+1]=temp/10;
	}
	num[i]=jinwei[i];
	if (jinwei[weishu]==1)
	{
		weishu+=1;
	}
}
int main()
{
	int j,n;
	num[0]=1;
	cin >>n;
	for (j=0;j<n;j++)
	{
		multiply();
	}
	for (j=weishu-1;j>=0;j--)
	{
		cout <<num[j];
	}
	return 0;
}
int main(){
	int i,j,n,k=1;
	cin>>n;//?????n
	int p[50];
	memset(p,0,200);//????
	p[0]=1;
	for(i=0;i<n;i++){
		for(j=0;j<50;j++){
		p[j]=p[j]*2;
	   }//?????
		for(j=0;j<50;j++){
			if(p[j]>=10){
				p[j]=p[j]%10;
				p[j+1]=p[j+1]+1;
			}//?????2????????1
		}
	}
	for(i=49;i>=0;i--){
		if(p[i]==0 && k==1){
			continue;
		}//??????0
		if(p[i]!=0)k=0;
		cout<<p[i];
	}//??????p
	return 0;
}//?????
int main()
{
	char a[200] = {0};
	int b[200] = {0};
	int n;
	cin >> n;

	a[0] = '1';
	int i = 0 ;
	for( ; i < n ; i++)
	{
		int j = 0;
		for( ; j < strlen(a) ; j++)
			b[j] = a[j] - '0';
		for(j = 0 ; j < strlen(a) ; j++)
			b[j] = b[j]*2 ;
		
		j = 199;
		while(b[j] == 0)
			j--;
		int k = j + 1;
		for(j = 0 ; j < k; j++)
		{
			b[j+1] += b[j]/10;
			b[j] = b[j]%10;
		}
		
		j = 199;
		while(b[j] == 0)
			j--;
		
		for( ; j >= 0; j--)
			a[j] = b[j] + '0';
	}

	i = 199;
	while(a[i] == 0)
			i--;
	for( ; i >= 0 ; i--)
		cout << a[i] ;
	cout << endl;

	
	return 0;
}
int a[max];
int b[max];
void cf(int *a,int *b);
void qldy(int *b);
int main(){
	int i;
	for(i=0;i<max;i++){
		a[i]=0;
		b[i]=0;
	}
	
	a[0]=1;
	
	int n;
	scanf("%d",&n);
        if(n==0){
           printf("1");
        }
	for(i=1;i<=n;i++){
		cf(a,b);
	}

	qldy(b);
	return 0;
}
void cf(int *a,int *b){
	int i;
	for(i=0;i<max-1;i++){
		b[i]=a[i]*2;
		
	}
	for(i=0;i<max-1;i++){
		if(b[i]>=10){
			b[i+1]+=b[i]/10;
			b[i]%=10;
		}
	}
	for(i=0;i<max-1;i++){
		a[i]=b[i];
	}
}
void qldy(int *b){
	int i;
	for(i=max-1;i>=0;i--){
		if(b[i]!=0){
			break;
		}
	}
	int t=i;
	for(i=t;i>=0;i--){
		printf("%d",b[i]);
	}

}
int main()
{
	int a[1000], i, num, N;
	cin >> N;
	for(i = 0; i < 999; i++)
		a[i] = 0;
	a[999] = 1;
	for(; N > 0; N--)
	{
		for(i = 999, num = 0; i > 0; i--)
		{	
			num = a[i] * 2 + num/ 10;
			a[i] = num % 10;
		}
	}
	for(i = 0; a[i] == 0; i++);
	for(; i < 1000; i++)
		cout << a[i];
	cout << endl;
	return 0;
}
int main()
{
	int a[100][100] = {0};
	int i, m, temp = 0, j;
	cin >> m;
	if(m == 0)
	{
		cout << 1;
		return 0;
	}
	a[0][99] = 2;
	for(i = 1 ; i < 100 ; i ++)
	{
		temp = 0;
		for(j = 99 ; j >= 0 ; j --)
		{
			temp = a[i - 1][j] + a[i - 1][j] + a[i][j];
			if(temp > 9)
				a[i][j - 1] ++;
			a[i][j] = temp % 10;
		}
	}
	int flag = 0;
	for(i = 0 ; i < 100 ; i ++)
	{
		if(flag == 1) 
			cout << a[m - 1][i];
		if(a[m - 1][i] != 0 && !flag)
		{
			cout << a[m - 1][i];
			flag = 1;
		}
		
	}
	return 0;
}
int main ()
{
	char ch[50] = {'1'};
	for ( int i = 1; i < 50; i ++ )
		ch[i] = '0';
	int n;
	cin >> n;
	int temp = 0;
	for ( int i = 1; i <= n; i ++ )
	{
		for ( int j = 0; j < 50; j ++ )
		{
			ch[j] = (ch[j]-'0')*2+temp;
			if ( ch[j] > 9 )
			{
				temp = 1;
				ch[j] = ch[j] - 10 + '0';
			}
			else
			{
				temp = 0;
				ch[j] = ch[j] + '0';
			}
		}
	}
	for ( int i = 49; i >= 0; i -- )
	{
		if ( ch[i] != '0' )
		{
			temp = i;
			break;
		}
	}
	for ( int i = temp; i >= 0; i -- )
		cout << ch[i];
	return 0;
}
int main()
{
	int n,i,j,num[40]={0},len=1,plus[40]={0};
	num[1]=1;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		for(j=1;j<=len+1;j++)
		{
			plus[j+1]=num[j]*2/10;
			num[j]=(num[j]*2+plus[j])%10;
		}
		if(num[len+1]>0)
			len++;
	}
	for(i=len;i>=1;i--)
		cout<<num[i];
	return 0;
}
void cheng(int a[100], const int n, int flag);
int main()
{
	int n;
	int a[100] = {2};
	cin >> n;
	if(n == 0)
		cout << "1" << endl;
	else
		cheng(a, n, 0);
	return 0;
}
void cheng(int a[100], const int n, int flag)
{
	int i = 0, j = 0, count = 0, l = 0, k = 0;
	int b[100] = {0};
	count = 99;
	while(a[count] == 0)
		count --;
	if(flag == n - 1)
	{
		for(i = 0; i <= count; i++)
			cout << a[i];
	}
	else
	{
		for(i = count; i >= 0; i--)
		{
			b[j++] = a[i];
		}
		for(i = 0; i <= count; i++)
			b[i] = b[i] * 2;
		for(i = 0; i <= count; i++)
		{
			if(b[i] >= 10)
			{
				b[i] = b[i] - 10;
			    b[i + 1]++;
			}
		}
		l = count + 1;
		while(b[l] == 0)
			l--;
		for(i = l; i >= 0; i--)
		{
			a[k++] = b[i];
		}
		flag++;
		cheng(a, n, flag);
	}
}
int main()
{
	int n, a[1000]={0}, j=0, i1;
	memset(a,0,sizeof(a));
	a[0] = 1;
	cin >> n;
	for(int i=0; i < n; i++)
	{
		for(int l=0;l < j+1; l++)
		{
			a[l] = 2 * a[l];
		}
		for(int k = j; k >= 0; k--)
		{
			if(a[k] > 9)
			{
				a[k+1] ++;
				a[k] = a[k] -10;
				j++;
			}
			else
			{
				continue;
			}
		}
	}
	for(i1 = j; i1  > 0; i1--)
	{
		if(a[i1] != 0)
		{
			break;
		}
	}
	for(;i1 >=0; i1--)
	{
		cout << a[i1];
	}
	cout << endl;
return 0;
}
void change(char a[]);
int len=1;
int main()
{
	int n,i;
	char a[500];
	cin>>n;
	a[0]='1';
	a[1]='\0';
	
	for(i=1;i<=n;i++)
	{
        
		
		
		change(a);
	}
	
	for(i=len-1;i>=0;i--)
	{
	   cout<<a[i];
	}

	return 0;
}
void change(char a[])
{
	int k=len,b,q=0;
	
	while(k>=1)
	{
		
		b=(a[k-1]-'0')*2;
		if(b<10)
		{
			a[k-1]=b+'0';
		}
		else

		{
			
			a[k-1]=b-10+'0';
			if(a[k]=='\0')
			{
				a[k]='1';
				len++;
				a[k+1]='\0';
			}
			else
			{
				a[k]=a[k]+1;
			}
		}
		
		k--;
	}
}
int a[200]={2};

void cal(int a[200],int I,int n)
{
	if(I==n)
	{
		int i;
		for(i=199;i>0;i--) if(a[i]) break;
		for(;i>=0;i--) cout<<a[i];
		cout<<endl;
	}

	else
	{
		int result[200]={0};

		for(int i=0;i<200;i++)
		{
			result[i]+=a[i]*2;
			if(result[i]>=10)
			{
				result[i+1]+=result[i]/10;
				result[i]=result[i]%10;
			}
		}

		cal(result,I+1,n);
	}
}

int main()
{
	int n;
	cin>>n;
	if(!n) cout<<1;

	else cal(a,1,n);
	


	return 0;
}
int main()
{
    int n;
    cin>>n;
    int w,s[100]; memset(s,0,sizeof(s));
    w=1; s[1]=1;
    for (int i=1;i<=n;i++)
    {
        for (int j=1;j<=w;j++) s[j]*=2;
        for (int j=1;j<=w;j++)
        {
            s[j+1]=s[j+1]+s[j]/10;
            s[j]=s[j]%10;
        }
        if (s[w+1]>0) w++;
    }
    for (int i=w;i>=1;i--) cout<<s[i];

    return 0;
}
int main(){
   int n;
   double s[101];
   int i;
   
   scanf("%d",&n);

   s[0]=1;
   s[1]=2;
   for(i=2;i<=n;i++){
	   s[i]=s[i-1]*2;
   }
		
   printf("%.0lf",s[n]);
   

	return 0;
}
char a[110]={0};
void temp()//????a??
{
	int yushu=0;
	for(int j=100;j>0;j--)
	{
		char c=a[j]+a[j]-'0'+yushu;
		if(c<='9')
		{
		a[j]=c;
		yushu=0;
		}
		else
		{
			a[j]=c-10;
			yushu=1;
		}
	}
}
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<110;i++)
	{
		a[i]='0';
	}
	a[100]='1';
	for(int i=0;i<n;i++)//??n???
	{
		temp();
	}
	int x=0;
	for(int i=0;i<110;i++)//?????
	{
		if(a[i]!='0')
		{
			x=i;
			break;
		}
	}
	for(int i=x;i<101;i++)//??
	{
		cout<<a[i];
	}
	return 0;
}
int main()
{
	char a[1000];
	a[0] = '1';
	int flag = 0, n, m = 0;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		for (int j = m; j >= 0; j--)
		{
			a[j] = (a[j] - '0') + (a[j] - '0') + '0' + flag;
			if (a[j] > '9')
			{
				flag = 1;
				a[j] = a[j] - 10;
			}
			else
			{
				flag = 0;
			}
		}
		if (flag == 1)
		{
			for (int k = m + 1; k > 0; k--)
			{
				a[k] = a[k - 1];
			}
			a[0] = '1';
			flag = 0;
			m++;
		}
	}
	for (int l = 0; l <= m; l++)
	{
		cout << a[l];
	}
	return 0;
}
int main(void)
{
	char res[32]="0000000000000000000000000000001",temp[2]="0";
	int n,i=0,j,c=0,t;
	scanf("%d",&n);
	for(;i<n;i++)
	{
		for(j=30;j>=0||(!c&&res[j]=='0');j--)
		{
			temp[0]=res[j];
			t=atoi(temp)*2+c;
			res[j]=t%10+'0';
			c=t/10;
		}
	}
	for(i=0;i<31&&res[i]=='0';i++);
	for(j=i;j<31;j++)res[j-i]=res[j];res[j-i]='\0';
	printf("%s\n",res);
	return 0;
}
//***********************
//*?????2?N??****
//*??????**********
//*???1000012832******
//***********************
int shumu(int a[]);//????shumu ????????????
int main()
{
	int N, a[100], i, m, j;
	cin >> N;
	memset(a, 0, sizeof a);//?????
    a [0] = 2;//?a[0]???
	if(N == 0)//??0??????1
	{
		cout << 1 << endl;
	}
	else if(N == 1)//??1??????2
	{
		cout << 2 << endl;
	}
	else
	{
		for(i = 1; i <= N - 1; i++)//??N???2????????N-1?2
		{
			m = shumu(a) + 1;//????????????
			for(j = 0; j < m; j++)
			{
				a[j] = a[j] * 2;//?????????2
			}
			for(j = 0; j < m; j++)
			{
				if(a[j] >= 10)//????10?????
			{
				a[j + 1]++;
				a[j] = a[j] - 10;
			}
		}
	}
    if(a[m] == 0)//?????M+1????0
	{
		for(i = m - 1; i >= 0; i--)//??m???
		{
			cout << a[i];
		}
		cout << endl;
	}
	else if(a[m] != 0)//???1
	{
		for(i = m; i >= 0; i--)//??M+1???
		{
			cout << a[i];
		}
		cout << endl;
	}
	}
	return 0;
}
int shumu(int a[])
{
	int k;
	for(k = 99; a[k] == 0; k--)
	{
	}
	return k;
}
int main()
{
	int n;
	cin>>n;//n????
	int a[100]={0},b[100];
	a[0]=1;
	int p=0,temp,i1;
	if (n!=0)
	{
		for (int i=0;i<n;i++)
		{
			for (i1=0;i1<=99;i1++)
			{
				temp=a[i1]*2+p;
				b[i1]=temp%10;
				a[i1]=b[i1];
				p=temp/10;
			}
		}//??????
		int t=0,i2;
		for (i2=99;i2>=0;i2--)
		{
			if (b[i2]==0)
				continue;
			else if (b[i2]!=0)
				break;
		}
		for (int i3=i2;i3>=0;i3--)
			cout<<b[i3];
	}
	else
		cout<<1;//2?0???1
	return 0;
}
int n;
int a[1001]={0};
void count(int n)
{
	if(n==0) return;
	for(int i=1000;i>0;i--)
		a[i]=a[i]*2;
	for(int i=1000;i>0;i--)
	{
		if(a[i]>=10)
		{
			a[i]-=10;
			a[i-1]++;
		}
	}
	count(n-1);
}

int main()
{
	cin>>n;
	a[1000]=1;
	count(n);
	for(int i=0;i<1001;i++)
	{
		if(a[i])
		{
			for(int j=i;j<1001;j++)
				cout<<a[j];
			break;
		}
	}
	return 0;
}
int main()
{
    int n;cin>>n;
    int answer1[40]={0};
    answer1[0]=1;
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<40;j++)       //??????
        {
            answer1[j]=answer1[j]*2;
        }
        for(int j=0;j<40;j++)
        {
            if(answer1[j]>=10)
            {
                answer1[j]=answer1[j]-10;
                answer1[j+1]++;
            }
        }
    }
    for(int i=37;i>=0;i--)
    {
        if(answer1[i]!=0||answer1[i+1]!=0||answer1[i+2])
            cout<<answer1[i];            //????
    }
    return 0;
}
int main(void)
{
	char res[32]="0000000000000000000000000000001";
	int n,i=0,j,c=0,t;
	scanf("%d",&n);
	for(;i<n;i++)
	{
		for(j=30;j>=0;j--)
		{
			t=(res[j]-'0')*2+c;
			res[j]=t%10+'0';
			c=t/10;
		}
	}
	for(i=0;i<31&&res[i]=='0';i++);
	for(j=i;j<31;j++)res[j-i]=res[j];res[j-i]='\0';
	printf("%s\n",res);
	return 0;
}
int a[50] = {0};

int length()
{
	int i;
	for (i = 49; i >= 0; i--)
		if (a[i] != 0)
			return (i + 1);
	return 0;
}

void power(int N)
{
	int i, temp, add = 0;
	if (N == -1)
		cout << "1" << endl;
	else if (N == 0)
	{
		for (i = length() - 1; i >= 0; i--)
			cout << a[i];
		cout << endl;
		return;
	}
	else
	{
		for (i = 0; i < length(); i++)
		{
			temp = add + a[i] * 2;
			a[i] = temp % 10;
			add = temp / 10;
		}
		a[i] = add;
		power(N - 1);
	}
}




int main()
{
	int N;
	a[0] = 2;
	cin >> N;
	power(N - 1);
	return 0;
}
int N;
void chenger(int depth,char *a)
{
	if(depth==N) //??N???
	{
		int len=strlen(a)-1;
		for(int i=len;i>=0;i--)
			cout<<a[i];
	}
	else
	{
		char b[100]={'\0'};
		int len=strlen(a);
		int temp[100]={0};//??
		for(int i=0;i<len;i++)//??
		{
			b[i]=((a[i]-'0')*2)%10+temp[i]+'0';
			temp[i+1]=((a[i]-'0')*2)/10;
		}
		if(temp[len]!=0) b[len]=temp[len]+'0';
		chenger(depth+1,b);
	}
}
int main()
{
	cin>>N;
	char num[100]={'\0'};
	num[0]='1';//2?0??
	chenger(0,num);
	return 0;
}
int main ()
{
	int n, m = 0, i, j = 0, flag = 0, flag1 = 1;
	int result[1001] = {1};
	cin >> n;
	for (i = 0; i < n; i++)
	{
		for (j = 0; j <= 1000; j++)
		{
			if (flag == 0) result[j] = result[j] * 2;
			if (flag == 1) {result[j] = result[j] * 2 + 1; flag = 0;}
			if (result[j] >= 10)
			{
				result[j] = result[j] - 10;
				flag = 1;
			}
		}
	}

	for (i = 1000; i >= 0; i--)
	{
		if (result[i] == 0 && flag1 == 1)
		{ continue;}
		else 
		{	
			flag1 = 0;
			cout << result[i];
		}
		  
	}
	
return 0;

}
int main(){
	double a,b;
	cin>>a;
	b=(double)pow(2,a);
	cout<<fixed<<setprecision(0);
	cout<<b<<endl;
	return 0;
}
int main()
{int i,n,a[32]={0},j;
scanf("%d",&n);a[0]=1;
for(j=0;j<n;j++){
for(i=0;i<31;i++){
	a[i]*=2;}
for(i=0;i<31;i++){
	if(a[i]>=10){a[i]-=10;a[i+1]++;}}}
for(i=31;i>=0;i--){
	if(a[i]==0 && a[i-1]!=0)break;}
for(j=i-1;j>=0;j--){printf("%d",a[j]);}


}
int main()
{
int n;
int flag=1;
cin>>n;
int result[109];
memset(result,0,sizeof(result));
result[1]=1;
while(n>0)
{
n--;
for(int i=1;i<=100;i++)
   result[i]=result[i]*2;
for(int i=1;i<=100;i++)
   if(result[i]>=10)
      {
      result[i]=result[i]-10;
	  result[i+1]++;
	  }
}
for(int i=99;i>=1;i--)
   {
    if(result[i]>1e-6)
       flag=0;
    if(flag==0)
       cout<<result[i];
   }   
return 0; 
}
int main(void)
{
	int i,k,n,sum;
	while(scanf("%d",&n)!=EOF)
	{
		sum=1;
		int a[10000];
		for(i=1;i<10000;i++)
			a[i]=0;a[0]=1;
		for(k=1;k<=n;k++)
		{
			for(i=0;i<sum;i++)
				a[i]=a[i]*2;
			for(i=0;i<sum;i++)
				if(a[i]>=10)
				{
					a[i+1]=a[i+1]+a[i]/10;
					if(i+1==sum)sum++;
					a[i]=a[i]%10;
				}
		}
		for(i=sum-1;i>=0;i--)
			printf("%d",a[i]);printf("\n");
	}
	return 0;
}
/*
 * a3.cpp
 *
 *  Created on: 2011-12-31
 *      Author: 2011
 */

/*
 * 3.cpp
 *
 *  Created on: 2011-12-31
 *      Author: 2011
 */
int main()
{
	int a[100]={0},i=0,n,b=1;
	cin>>n;
	if(n<32){
		for(i=0;i<n;i++){
			b*=2;
		}
		cout<<b<<endl;
	}
	else{
		a[0]=2;
		int len=1,j=0;
	for(i=1;i<n;i++)
	{
		for(j=0;j<len;j++)
			a[j]=a[j]*2;
		for(j=0;j<len;j++)
			if(a[j]>=10){
				a[j+1]++;
				a[j]=a[j]-10;
		}
		if(a[len]!=0)len++;
	}
	for(i=len-1;i>=0;i--)cout<<a[i];
	//}
	cout<<endl;}
	return 0;
}
int num[100];
int main(){
	int n;
	scanf("%d",&n);
    int i,j;
    num[99]=1;
    for(j=0;j<n;j++){
        for(i=0;i<100;i++){
             num[i]*=2;
             if(num[i]>9){
                 num[i]-=10;
                 num[i-1]+=1;
			 }
		}
	}
    j=0;
    for(i=0;i<100;i++){
		if(num[i]!=0){
            j++;
		}
		if(j!=0){
            printf("%d",num[i]);
		}
	 }
	 return 0;
}
int main()
{
    int ans[1000] = {0}, l = 0, i, n;
    cin >> n;
    ans[0] = 1;
    l = 1;
    while (n--)
    {
        for (i = 0; i < l; i++)
            ans[i] = ans[i] << 1;
        for (i = 0; i < l; i++)
        {
            if (i == l - 1 && ans[i] > 9)
            {
                l++;
            }
            ans[i + 1] += ans[i] / 10;
            ans[i] %= 10;
        }
    }
    for (i = l - 1; i >= 0; i--)
    {
        cout << ans[i];
    }
    cout << endl;
    
    return 0;
}
int main()
{
	int n, length = 1, mark = 0;                           //????
	int a[110] = {0};
	a[0] = 1;                                              //???
	cin >> n;

	for ( int i = 0; i < n; i++ )                          //???N?
	{
		for ( int j = 0; j <= length; j++ )                
		{
			a[j] = a[j] + a[j];                            //??????
			if ( mark == 1 )
			{
				a[j]++;                                    //??????????1
				mark = 0;
			}
			if ( a[j] >= 10 )                              //???????10????10???????????
			{
				a[j] -= 10;
				mark = 1;
			}
		}
		if ( a[length] != 0 )                              //?????0?????1
			length++; 
	}

	for ( int k = 0; k < length; k++ )                     //??
		cout << a[length - 1 - k];
	return 0;
}
int a[200] = {0};

void f(int n)
{
	int i, m = 100, temp = 0;
	while (a[m] == 0)
		m--;
	if (n == 0)
	{
		for (i = m; i >= 1; i--)
			cout << a[i];
		cout << endl;
		return;
	}
	for (i = 1; i <= m; i++)
	{
		a[i] = a[i] * 2 + temp;
		temp = 0;
		if (a[i] >= 10)
		{
			temp = a[i] / 10;
			a[i] = a[i] - 10;
		}
	}
	if (temp != 0)
		a[m + 1] = temp;
	f(n - 1);
}

int main()
{
	int n;
	cin >> n;
	a[1] = 1;
	f(n);
	return 0;
}
int main()
{
    const int MAX_LEN = 1000;
    int n,i,j;
    cin >> n;
    int num[MAX_LEN]={0};
    num[0]=1;
    for (i=0;i<n;i++)
    {
        for (j=0;j<MAX_LEN;j++)
        {
            num[j]=num[j]*2;
        }
        for (j=0;j<MAX_LEN;j++)
        {
            if (num[j]>=10)
            {
                num[j+1]=num[j+1]+num[j]/10;
                num[j]=num[j]%10;

            }
        }


    }
    i=MAX_LEN-1;
    while (num[i]==0)
    i--;
    for (;i>=0;i--)
    cout << num[i];
    return 0;

}
int main()
{
	char a[1000000];
	int N, i, j;
	cin >> N;
	for(i = 0;i < 1000000;i++)
		a[i] = '0';
	a[0] = '2';
	int count = 1;
	if(N == 0)
		cout << 1;
	else
	{
		for(i = 0;i < N-1;i++)
		{
			for(j = 0;j < 1000000;j++)
			{
				a[j] = (a[j] - '0')* 2;
			}
			for(j = 0;j < 1000000;j++)
			{
				if(a[j] > 9)
				{
					a[j] = a[j] - 10 + '0';
					a[j+1]++;
				}
				else
				{
					a[j] = a[j] + '0';
				}
			}
		}
		int first = 0;
		for(i = 999999;i>=0;i--)
		{
			if(a[i] != '0' || first == 1)
			{
				first = 1;
				cout << a[i];
			}
		}
	}
	return 0;
}
char str[100];

void power(int n)
{
	int i,j;
	if(n==0)
	{
		str[1]='1';
		str[0]='0';
	}
	else
	{
		power(n-1);
		int len=strlen(str);
		int b[100];
		b[len-1]=0;
		for(i=len-1;i>=1;i--)
		{
			if(2*(str[i]-'0')+b[i]<10)
			{
				str[i]=2*(str[i]-'0')+b[i]+'0';
				b[i-1]=0;
			}
			else
			{
				str[i]=2*(str[i]-'0')+b[i]-10+'0';
				b[i-1]=1;
			}
		}
		if(b[0]==1)
		{
			str[0]='1';
			for(j=len;j>=1;j--)
				str[j]=str[j-1];
		}
		
			str[0]='0';
	}
}
int main()
{
	int n,i;
	cin>>n;
	power(n);

	for(i=1;i<=strlen(str)-1;i++)
	{
       cout<<str[i];
	}
		
}
//********************************
//*???2?N??                 **
//*?????? 1300012773        **
//*???2013.11.13              **
//********************************
int main()
{
	int N;
	int num[10000] = {0}; //?????????0
	int result;
	int k;
	cin >> N;

	if(N == 0) //??N?????????????1?
		cout << 1;
	else //??N?????????
	{
		k = 0; //?k???????????
		num[0] = 1;

		//????????????????????
		for(int i = 1; i <= N; i++)
		{
			for(int j = 0; j <= k; j++)
			{
				num[j] *= 2;
			}
			for(int j = 0; j <= k; j++)
			{
				if(num[j] >= 10)
				{
					num[j] -= 10;
					num[j+1]++;
				}
			}

			//??????????????k?1
			if(num[k+1] != 0)k++;
		}

		//????
		for(int j = k; j >= 0 ;j--)
			cout << num[j];
	}

	return 0;
}
int  main()
{ 
 int n,i,j,k,a[50];
 cin>>n;
 for(i=0;i<50;i++)
 { a[i]=0;}
  a[0]=1;
for(k=0;k<n;k++)
{
  for(i=0;i<50;i++)
   {
     a[i]=2*a[i];
   }
  for(i=0;i<50;i++)
  { 
    if(a[i]>=10)
     {
      a[i+1]=a[i+1]+1;
      a[i]=a[i]-10;  
     }
  }
}
 for(i=49;i>=0;i--)
{  if(a[i]!=0)
    break;  }
  for(j=i;j>=0;j--)
  {cout<<a[j];}
  cout<<endl;
 return 0;
}
int a[MAX]={0};
int main()
{
	a[0]=1;
	int i,j,n;
	scanf("%d",&n);
	for(i=0;i<n;i++){
        for(j=0;j<=MAX;j++){
        	a[j]=2*a[j];
        }
        for(j=0;j<=MAX;j++){
        	if(a[j]>=10){
        		a[j+1]+=a[j]/10;
	        	a[j]=a[j]%10;
	        }
        }
	}
	int k;
	for(i=MAX;i>=0;i--){
		if(a[i]!=0){
		   k=i; 
		   break;	
		}		
	}
	for(i=k;i>=0;i--)
	printf("%d",a[i]);
}