semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int a[100]={0},l;
void count(int);
int main()
{
	int n;
	cin>>n;
	if(n==0)
		cout<<"1"<<endl;
	else
		if(n==1)
			cout<<"2"<<endl;
		else
		{
			a[0]=2;
			count(n-1);
			l=99;
			while(a[l]==0)
				l--;
			for(;l>=0;l--)
				cout<<a[l];
			cout<<endl;
		}
	return 0;
}
void count(int n)
{
	int i;
	if(n==0)
		return;
	else
	{
		for(i=0;i<99;i++)
			a[i]=a[i]*2;
		for(i=0;i<99;i++)
			if(a[i]>=10)
			{
				a[i+1]+=a[i]/10;
				a[i]=a[i]%10;
			}
	}
	count(n-1);
}
int main()
{
	int n,flag =0;
	cin >> n;
	int a[100] ={0};
	a[0] = 1;
	int i,j;
	for (i = 1;i <=n; i++)
	{
		for(j =0;j<=99;j++)
			a[j] = a[j]*2;
		for(j = 0; j<=99;j++)
		{
			if (a[j] >=10)
			{
				a[j+1] = a[j+1]+(a[j]-a[j]%10)/10;
				a[j] = a[j]%10;
			}
		}
	}
	for(i =99; i>=0;i--)
	{
		if(a[i]!=0 ||flag)
		{
			flag =1;
			cout <<a[i];
		}
	}
	return 0;
}
int main()
{
	char a[100];
	int j, n, i, k = 0;
	a[0] = 2;
	for(i = 1; i < 100; i++)
		a[i] = 0;
	cin >> n;
	if(n == 0)
		cout << "1" <<endl;
	else
	{for(j = 0; j < n - 1;j++)
	{
		int flag = 1;
	    for(i = 0; i < 100; i++)
		{
			if(flag)
			{
				if((a[i] - 0) * 2 < 10)
					a[i] = (a[i] - 0) * 2;
				else
				{
					a[i] = ((a[i] - 0) * 2) % 10 ;
					flag = 0;
				}
			}
			else 
			{
				if(((a[i] - 0) * 2 + 1) < 10)
				{
					a[i] = (a[i] - 0) * 2 + 1;
					flag = 1;
				}
				else
				{
					a[i] = ((a[i] - 0) * 2 )% 10 + 1;
					flag = 0;
				}
			}
		}
	}
	 for(i = 99; i >= 0; i--)
	 {
		 if(a[i] != 0)
			 k = 1;
		 if(k)
			 cout << a[i] - '0' + 48;
	 }
	}
	return 0;
}
int num[101] = {0};
void fun()
{
	int temp = 0, j = 100;
	do
	{
		if (num[j] < 5)
		{
			num[j] =  num[j] * 2 + temp;
			temp = 0;
		}
		else
		{
			num[j] = num[j] * 2 - 10 + temp;
			temp = 1;
		}
		j--;
	} while(j >= 0);
	return;
}
int main()
{
	num[100] = 1;
	int N, i, flag = 0;
	cin >> N;
	for (i = 0; i< N; i++)
		fun();
	for (i = 0; i < 101; i++)
	{
		if (flag == 0 && num[i] == 0)
			continue;
		cout << num[i];
		flag = 1;
	}
	return 0;
}
//Name: ??2?N??.#
//Author:   ??     #
//Number:1000062710  #
//Date:2010?12?15?#
//####################
int main()
{
	int N,i;
	cin >> N;
	int a[400] = {0};
	a[399] = 1;
	for(i = 0; i < N; i++)
	{
		for(int j = 0; j < 400; j++)
		{
			a[j] = a[j] * 2;
		}
		for(int k = 399; k >= 0; k--)
		{
			if(a[k] >= 10)
			{
				a[k] = a[k] - 10;
				a[k - 1]++;
			}
		}
	}
	for(i = 0; i < 400; i++)
	{
		if(a[i] != 0)
		  break;
	}
	for(int j = i; j < 400; j++)
	{
		cout << a[j];
	}
	cout << endl;
	return 0;
}
int main()
{
	int n;
	cin >> n;
	char num[100];
	int add[100] ={0};
	int i, j, flag[100] ={0};
	num[99] = '1';
	flag[99] = 1;
	for (i = 0; i < 99; i ++)
		num[i] ='0';
	if ( n == 0 )
		cout << num[99];
	for (i = 1; i <= n; i ++)
	{
		for (j = 99; flag[j] == 1; j -- )
		{
			if ((num[j] - '0') * 2 < 10 )
				num[j] = (num[j] - '0') * 2 + '0';
			else
			{
				add[j - 1] = (num[j] - '0') * 2 / 10;
				num[j] = ((num[j] - '0') * 2) %10 + '0';
			}
		}
		if ( add[j] == 1 )
			flag[j] = 1;
		for ( j = 0; j < 100; j ++ )
		{
			num[j] = add[j] + num[j];
			add[j] = 0;
		}
	}
	if ( n != 0 )
	{
		for (i = 0; i < 100; i ++ )
			if (flag[i])
				cout << num[i];
	}
	return 0;
}
int a[100][300]={0};
void cheng(int t);
int main()
{
	int n;
	cin>>n;
	a[0][1]=1;
	int i,start;
	for(i=1;i<=n;i++) cheng(i);
	for(i=200;i>0;i--)
	{
		if(a[n][i]!=0) {start=i;break;}
	}
	for(i=start;i>0;i--) cout<<a[n][i];
	return 0;
}
void cheng(int t)
{
	int i;
	for(i=1;i<200;i++)
	{
		a[t][i]=a[t][i]+a[t-1][i]*2;
		if(a[t][i]>9) {a[t][i]=a[t][i]-10;a[t][i+1]++;}
		if(a[t][i+1]>9) {a[t][i+1]=a[t][i+1]-10;a[t][i+2]++;}
	}
}
int main()
{
    int i,n,t,len,ans[100];
    cin >> n;
    len=1;ans[0]=1; // ???
    while (n--)
    {
        t=0; // ??
        for (i=0;i<len;i++)
        {
            ans[i]=ans[i]*2+t; // ??+??
            t=ans[i]/10; // ??
            ans[i]%=10;
        }
        if (t>0) ans[len++]=t; // ????
    }
    for (i=len-1;i>=0;i--)
        cout << ans[i]; // ??
    cout << endl;
    return 0;
}
char answer[1000000]={'1'};
int temp[1000000]={0};

int main()
{
	int n;

	cin>>n;

	if (n==0)
		cout<<'1';
	else{

	int i,j;
    
	for (j=0;answer[j]!='\0';j++)
		temp[j]= answer[j]-'0';
	
	for (int k=1;k<=n;k++)
	{
		for (i=0;i<j;i++)
			temp[i]=temp[i]*2;
		
		for (i=0;i<j;i++)
		{
			if (temp[i]>=10)
			{
				temp[i+1] += temp[i]/10;
				temp[i]=temp[i]%10;
			}
		}

		while (temp[i]==0) 
			i--;
		j=i+1;
	}

	for ( j=i;j>=0;j--)
		cout<<temp[j];
	}

	return 0;
}
int main ()
{
	int i,j,k,n, remain = 0, index;
	int ans[100000] = {1,0};
	cin >> n;
	for (i = 0; i < n; i++)
	{
		remain = 0;
		for (j = 0; j < 100000; j++)
		{
			ans[j] = 2*ans[j] + remain;
			remain = ans[j] /10;
			ans[j] = ans[j] %10;
		}
	}

	index = 99999;
	while (ans[index] == 0)
		index--;
	for (i = index; i >= 0; i--)
		cout << ans[i];
	cout << endl;


}
//********************************
//*ày3ì?o&#188;&#198;&#203;&#227;2?&#196;N?&#206;·&#189;           **
//*×÷&#213;&#223;?oí&#245;&#197;&#244;·é 1300013007      **
//*ê±&#188;&#228;?o2013.11.15             **
//********************************
int main()
{
	int n, i, j, k, l, len;
	int num[110] = {0};
	cin >> n;
	if(n == 0)
		cout << "1";
	else
	{
		num[0] = 1; len = 1;
		for(i = 1; i <= n; i++)
		{
			for(k = 0; k < len; k++)
			{
				num[k] *= 2;
			}
			for(l = 0; l < len; l++)
			{
				if(num[l] >= 10)
				{
					num[l+1] += num[l] / 10;
					num[l] %= 10;
				}
			}
			if ( num[len]!=0 ) len++ ;  
			
		}
		for( j=len-1 ;j >= 0; j--)
			cout << num[j];
	}
	return 0;
}
int main(){
	int n,i,c,j;
	scanf("%d",&n);
	int sz[100]={1,0};
	c=0;
	for(j=0;j<n;j++){
	        for(i=0;i<100;i++){
                       sz[i]=sz[i]*2+c;
                       if(sz[i]>=10){
                                     sz[i]-=10;
                                     c=1;
                                     }else{
                                           c=0;
                                           }
                                           }
                                           }
     i=99;
                        while(sz[i]==0){
                                       i--;
                                       }
                                       
      for(;i>=0;i--){
                     printf("%d",sz[i]);
                     }                                                        

return 0;
}
int line[99999]={0},temp[99999]={0};
void cal(int line[99999])
{
	int i;
	for(i=0;i<9999;i++)
	{
		temp[i]=line[i]*2;
		
	}
	for(i=0;i<9999;i++)
	{
		if(temp[i]>=10)
		{
			temp[i]=temp[i]-10;
			temp[i+1]=temp[i+1]+1;
		}
	}
	for(i=0;i<9999;i++)
	{
		line[i]=temp[i];
	}
}
int main()
{
	int n,p=0,j,i;
	cin>>n;
	if(n==0)cout<<"1"<<endl;
	else 
	{
		line[0]=1;
		while(p<n)
		{
			cal(line);
			p++;
		}
		j=9998;
		while(temp[j]==0)j--;
		for(i=j;i>=0;i--)
			cout <<temp[i];
		cout <<endl;
	}
	return 0;
}
int main()
{
	int n,a[100] = {0},i,ii = 0,b[100] = {0};
	cin >> n;                                   //??n
	a[0] = 1;

	for (i = 0;i < n;i++)                       //??n?
	{
		for (ii = 0;ii < 100;ii++)
			b[ii] = 0;
		for (ii = 0;ii < 100;ii++)              //????2
		{
			a[ii] = a[ii] * 2;
			if (a[ii] >= 10)                      //??????
			{
				b[ii + 1] = 1;
				a[ii]-= 10;
			}
		}                                       
		for (ii = 0;ii < 100;ii++)              //????
			a[ii]+= b[ii];
	}
	for (i = 99;a[i] == 0;i--);                 //??????????
	while (i >= 0)                              //????
	{
		cout << a[i];
		i--;
	}
	return 0;
}
int a[510],b[510];
void function();
int main()
{
	a[0]=2;b[0]=-1;
	for(int i=1;i<=500;i++){
		a[i]=-1;b[i]=-1;
	}
	int n;
	cin>>n;
	if(n==0)cout<<"1";
	else if(n==1)cout<<"2";
	else {
	for(int j=1;j<n;j++)
	 {function();}

	int lena;
    for(int i=0;i<=500;i++)
	  if(a[i]==-1)
	   {lena=i-1;break;}

    for(int i=lena;i>=0;i--)
		cout<<a[i];
	}
	return 0;
}
void function()
{ int lena;
  for(int i=0;i<=500;i++)
	  if(a[i]==-1){
		  lena=i-1;break;
	  }
  //???a[],??0-lena

  for(int i=500;i>=500-lena;i--)
	  {a[i]=a[500-i];b[i]=a[500-i];}
  //??a[],????b[]

  
  for(int i=500-lena;i<=500;i++){
	  a[i]=2*a[i];
	  if(a[i]>=10){
		  a[i]=a[i]-10;
		  a[i-1]++;
		  if(a[i-1]==0){a[i-1]++;lena++;}//?????????????
	  }
  }

  for(int i=0;i<=lena;i++)
   {a[i]=a[500-i];b[i]=-1;}
  //??a[]????b[]
}
int main()
{
	int a[42] = {0}, N, i, j, k;  //?????????0
	cin >> N;
	a[41] = 1;  //??????????2 
	if (N == 0)
	{
		cout << "1" << endl;
		return 0;
	}
	for (k = 1; k <= N; k++)  //????N??2
	{
	    for (i = 41; i >= 0; i--)  //??????2
	    	a[i] = a[i] * 2;
	    for (j = 41; j >= 0; j--)  //?????
		    if (a[j] >= 10)
			{
			    a[j-1] += a[j] / 10;
			    a[j] = a[j] % 10;  //??
			}
	}
	i = 0;  //?i???
  	while(a[i]==0)  //???????0??
		    i++;
	for (; i <= 41; i++)  //????
	     cout << a[i];
	cout << endl;
	return 0;
}
int main()
{
	int num[50]={0};
	int n,k,i,j,flag=0;
	cin>>n;
	num[1]=2;
	for(k=0;k<n-1;k++)
	{
		i=49;
		while(num[i]==0)
			i--;

		for(j=1;j<=i+1;j++)
		{
			num[j]*=2;
			if(num[j-1]>=10)
			{
				num[j-1]-=10;
				num[j]+=1;
			}
			
		}
	}
	
	if(n==0)
		cout<<1<<endl;
	else

	{i=49;
	while(num[i]== 0) 
		i--; //???????0??
	for (; i > 0; i--)
		cout << num[i]; //??????
	cout << endl;
	}
	return 0;
}
int main()
{
	int n;
	cin >> n;
	int num[50] = {0};
	int num0[50] = {0};
	int i, j;
	int k = 1;
	num[0] = 1;
	for (i = 1; i <= n; i++)
	{
		for (j = 0; j < k; j++)
		{
			num[j] = num[j] * 2;
			num0[j] = num[j] / 10;
			num[j] = num[j] % 10;
		}
		for (j = 0; j < k; j++)
			num[j + 1] += num0[j];
		if (num[k] != 0)
				k++;
	}
	for (i = k - 1; i >= 0; i--)
		cout << num[i];
	cout << endl;
	return 0;
}
int a[31] = {0};

void double_()
{
	int i;
	for (i = 0; i < 31; i++)
		a[i] = a[i] * 2;
	for (i = 0; i < 31; i++)
	{
		a[i + 1] += a[i] / 10;
		a[i] = a[i] % 10;
	}
}

int main()
{
	a[0] = 1;
	int n, i, j;
	cin >> n;
	for (i = 1; i <= n; i++)
		double_();
	for (i = 31; i >= 0; i--)
		if (a[i] != 0)
			break;
	for (j = i; j >= 0; j--)
		cout << a[j];
	cout << endl;
	return 0;
}
/*
 * ????main.cpp
 * ??????
 * ?????2012-12-17
 * ?????????????N(N<=100)???2?N?????
 */


int main ()
{
	int N,i,j,k;//??????N??????N???????i,j,k
	char a[50];//????a????????
	memset(a,0,sizeof(a));//???
	cin >> N;
	if ( N >= 1 )//???
		a[0] = '2';
	else 
		a[0] = '1';
	j = 0;
	for ( i = 2; i <= N; i++ ) //?N >= 2??????????
	{
		k = 0;//??????????
		for ( j = 0; a[j]; j++ )//?????????????a[0]????
		{
			a[j] = ((a[j] - '0') * 2) + k + '0';
			k = 0;//???
			if ( a[j] > '9' )//??????
			{
				a[j] -= 10;
				k = 1;
			}
		}
		if ( k == 1 )//??????
			a[j] = '1';
	}
	if ( a[j] )//??a[j]?????
		cout << a[j];
	for ( j -= 1; j >= 0; j-- )//????????
		cout << a[j];
	cout << endl;
	return 0;
}
int main()
{
	char a[101];
	memset(a, 0 , sizeof(a));
	int i, j, n, flag = 0;
	cin >> n;
	a[100] = 1;
	for(i = 0 ; i < n ; i++)
	{
		j = 100;
		do
		{
			a[j] = 2 * a[j];
			j--;
		}while(!(a[j] == 0 && a[j - 1] == 0 && a[j - 2] == 0 ));
		j = 100;
		do
		{
			if(a[j] >= 10)
			{
				a[j] = (int)a[j] % 10;
				a[j - 1] += 1;
			}
			j--;
		}while(!(a[j] == 0 && a[j - 1] == 0 && a[j - 2] == 0 ));
	}
	for(i = 0 ; i <= 100 ; i++)
	{
		if(a[i] == 0 && flag == 0)
		{
			continue;
		}
		else
		{
			flag = 1;
			cout << (int)a[i];
		}
	}
	return 0;
}
int a[10001],len=1;
void cal()
{
	int i;	
	a[len]*=2;
	i=len-1;
	if (a[len]>=10)
	{
		a[len]-=10;
		a[++len]=1;
	}
	for (;i>=1;i--)
	{
		a[i]*=2;
		if (a[i]>=10)
		{
			a[i]-=10;
			a[i+1]+=1;
		}
	}
};

int main()
{
	int n,j;
	cin>>n;
	for (j=1;j<=10000;j++)
		a[j]=-1;
	a[1]=1;
	for (j=1;j<=n;j++)
		cal();
	for (j=len;j>=1;j--)
		cout<<a[j];
	cout<<endl;
	return 0;
}
int main()
{
	int sz[200]={0},carry=0,i,k,n;
    scanf("%d",&n);
	if(n==0)
	{
		printf("1");
		return 0;
	}
	sz[0]=2;
	for(i=1;i<n;i++)
	{
		for(k=0;k<199;k++)
		{
			sz[k]=sz[k]*2+carry;
			carry=0;
			while(sz[k]>=10)
			{
				sz[k]-=10;
				carry++;
			}
		}
	}
    for(i=199;i>=0;i--)
	{
		if(sz[i]!=0)
		{
			for(i=i;i>=0;i--)
			{
				printf("%d",sz[i]);
			}
		    break;
		}
	}
	return 0;
}
int main()
{
	char a[100];
	int n, c, len, j, i, k;
	cin >> n;
	a[0] = '1';
	a[1] = '\0';
	for(i = 1; i <= n; i ++)
	{
		c = 0;
		len = strlen(a);
		for(j = 0; j <= len - 1; j ++)
		{
			if(a[j] - '0' < 5)
			{
				a[j] = (a[j] - '0') * 2 + '0' + c;
				c = 0;
			}
			else
			{
				a[j] = (a[j] - '0') * 2 + '0' + c - 10;
				c = 1;
			}
		}
		a[j] = c + '0';
		if(a[j] != '0')
		    a[j + 1] = '\0';
		else
			a[j] = '\0';
	}
	len = strlen(a);
	for(k = len - 1; k >= 0; k--)
		cout << a[k];
	return 0;
}
/*************************************************************************************************************
* @file .cpp
* @author ????
* @date 
* @description
*         
*/


int main()
{
	int n, i, j, s;
	int a[40] = {0};
	cin >> n;
	a[0] = 1;
	for(i = 0; i < n; i++)
	{
		for(j = 0; j < 40; j++)
			a[j] = 2 * a[j];
		for(s = 39;a[s] == 0; s--);
		for(j = 0; j <= s; j++)
		{
			a[j + 1] += a[j] / 10;
			a[j] = a[j] % 10;
		}
	}
	for(s = 39;a[s] == 0; s--);
	for(i = s; i >=0; i--)
		cout << a[i];
	cout << endl;
	return 0;
}
int a[100];
int main()
{
  a[0]=1;
  int k=1,i,n;
  scanf("%d",&n);
  while(n--)
  {
    for(i=0;i<k;i++)    
        a[i]*=2;    
    for(i=0;i<k;i++)
       if(a[i]>=10)
         {
           a[i+1]+=a[i]/10;
           a[i]%=10;
           if(i==k-1)
             k++;         
         }
  }
  for(i=k-1;i>=0;i--)
     printf("%d",a[i]);
 return 0;
}
// ??2?N?? 
int main()
{
	int i, j, n, a[100]; // i,j?????n?2????
	cin >> n;
	memset(a, 0, sizeof(a)); // ????
	a[0] = 1; // ???????1
	for (i = 0; i < n; i++) // n??2
	{
		for (j = 0; j < i + 1; j++) // ???2
			a[j] = a[j] * 2;
		for (j = 0; j < i + 1; j++) // ??
		{
			a[j + 1] += a[j] / 10;
			a[j] = a[j] % 10;
		}
	}
	i = 99; // ????????
	while (a[i] == 0) // ??????
		i--;
	for (j = i; j >= 0; j--) // ????
		cout << a[j];
	return 0;
}
int main()
{
	int a[201] = {0};
	int i, j;
	a[1] = a[0] = 1;
	int n;
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		for (j = 1; j <= a[0]; j++)
			a[j] = a[j] * 2;
		for (j = 1; j <= a[0]; j++)
		{
			a[j + 1] += a[j] / 10;
			a[j] = a[j] % 10;
		}
		if (a[a[0] + 1] > 0) a[0]++;
	}
	for (i = a[0]; i >= 1; i--)
		cout << a[i];
	cout << endl;
	
	return 0;
}
int r[100]={0};

int main()
{
	int n;
	cin>>n;
	r[0]=2;
	if (n==0)
		cout<<'1';
	else
		if (n==1)
			cout<<'2';
		else
		{

			for (int i=2;i<=n;i++)
			{
				for (int i=0;i<100;i++)
				{
					r[i]=r[i]*2;
				}
				for (int i=0;i<100;i++)
				{
					r[i+1]+=r[i]/10;
					r[i]=r[i]%10;
				}
			}
			int start=0;
			for (int i=0;i<100;i++)
			{
				if 	(r[100-i-1]!=0)
				{
					start=100-i-1;
					break;
				}

			}

			for (int i=start;i>=0;i--)
			{
				cout<<r[i];
			}
		}

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

			}
			else
			{
				b[j]=(a[j]*2+b[j-1])/10;
				a[j]=(a[j]*2+b[j-1])%10;
			}
		}
	}
	for(i=100;i>=0;i--)
	{
		if(a[i]!=0)
		{
			for(j=i;j>=0;j--)
			{
				cout <<a[j];
			}
			break;
		}
	}
	return 0;
}
int main()
{
	int n,i;
	cin>>n;
	int ans[1000]={0};
	if(n==0)cout<<"1";
	else if(n==1)cout<<"2";
	else{

	ans[0]=2;
	for(i=1;i<n;i++){
		for(int j=0;j<1000;j++)
			if(ans[j]==0 && ans[j+1]==0 && ans[j+2]==0){   //???0-(j-1)
				for(int k=0;k<=j-1;k++){
					if(ans[k]>9)
					   {ans[k+1]++;ans[k]=ans[k]%10;}
				}
				break;
			}
			else
			  {ans[j]=ans[j]+ans[j];}
	}

	int len;
	for(int j=0;j<1000;j++)
		if(ans[j]==0 && ans[j+1]==0 && ans[j+2]==0)
		  {len=j-1;break;}

	for(i=len;i>=0;i--)
		cout<<ans[i];
	}
	
	return 0;
}
//********************************
//*???5.cpp   **
//*?????2?N??    **
//*?????? 1300012838 **
//*???2013.11.18  **
//********************************

int main()
{
    int a[10000], n, len = 1, up;
    cin >> n;
    a[1] = 1;
    for (int i = 1; i <= n; i++)
    {
        up = 0;
        for (int j = 1; j <= len; j++)
        {
            a[j] *= 2;
            a[j] += up;
            if (a[j] >= 10)
            {
                a[j] = a[j] - 10;
                up = 1;
            }
            else
                up = 0;
        }
        if (up == 1)
        {
            a[len + 1] = 1;
            len++;
        }
    }
    for (int i = len; i >= 1; i--)
        cout << a[i];
    cout << endl;

    return 0;
}
/*
  *@ title:??2?N??
  *@ date:2010-12-15
  *@ author:1000012899 ???
  *@ description: ?????
*/
int main()
{
    int n, i, j;
    unsigned s;
    int sum[40] = {8, 4, 6, 3, 8, 4, 7, 4, 1, 2};
    cin >> n;
    if (n <= 31) 
    {
        s = 1;
        for (i = 1; i <= n; i++) s = s * 2;
        cout << s;
    }
    else
    {
        for (i = 1; i <= n - 31; i++)
        {
            for (j = 0; j < 39; j++) sum[j] = sum[j] * 2;
            for (j = 0; j <= 39; j++)
            {
                sum[j+1] = sum[j] / 10 + sum[j+1];
                sum[j] = sum[j] % 10;                    
            }
        }
        i = 39;
        while(sum[i] == 0) { i--;}
        for (j = i; j >= 0; j--) cout << sum[j];
    }
    return 0;
}
/**
 * @file   5.cpp
 * @author ???
 * @date   2013-11-15
 * @description
 *         ?????????(11-12) ??2?N??
 */



int main()
{
	int N, k, i, j = 0, a[100] = {1}, b[100];          // i, j, k?????????
	cin >> N;

	for (k = 1; k <= N; ++k)
		for (i = 0; i <= j; ++i)              // ??????
		{
			if (!i) b[0] = a[0];
			b[i + 1] = a[i + 1];
			a[i] += b[i];
			if (a[i] >= 10)
			{
				a[i] -= 10;
				++a[i + 1];
				if (a[i + 1] == 1 && i == j)
				{
					++j;
					break;
				}
			}
		}

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

	return 0;
}
int main()
{
  int n,i;
  double result=1;
  scanf("%d",&n);
  result=pow(2.0,1.0*n);
  printf("%.0lf",result);
  return 0;
}
int main()
{
    int n, sum[100000], i, j, l = 1, m;
    
    memset(sum, 0, sizeof(sum));
    
    sum[0] = 2;
    
    cin >> n;
    
    if(n == 0) cout << 1 << endl;
    else
    {
        for(i = 1; i < n; i++)
        {
            for(j = 0; j < l; j++)
            {
                sum[j] = sum[j] * 2;
            }
        
            for(j = 0; j < l; j++)
            {
                if(sum[j] > 9)
                {
                    sum[j] = sum[j] % 10;
                    sum[j + 1]++;
                }
            }
            l++;
        }
        
        for(i = l; sum[i] == 0; i--)
        {
            m = i;
        }
        
        for(i = m - 1; i >= 0; i--)
        {
            cout << sum[i];
        }
        cout << endl;
    }

    return 0;
}
int ss(char a[100])
{
	int i=0,b[100],s=0,m,n;
	while(a[i]!='a')
	{
		i++;
	}
	
	if(i==1)
	{
		b[0]=a[0]-48;
		b[0]=2*b[0];
		if(b[0]>9)
		{
			a[1]=b[0]%10+48;
			a[0]=b[0]/10+48;
			return 1;
		}
		else
		{
			a[0]=b[0]+48;
			return 0;
		}
	}
	else
	{
		b[0]=a[0]-48;
		if(b[0]>=5)
		{
			for(m=(i-1);m>=0;m--)
			{
				if(m>0)
				{
				b[m]=a[m]-48;
				b[m]=b[m]+b[m];
				}
				else
				{
					b[0]=b[0]*2;
				}
				if(b[m]>9)
				{
					a[m+1]=b[m]%10+48+s;
					s=1;
					
				}
				else
				{
					a[m+1]=b[m]+48+s;
					s=0;
					
				}
				a[0]=49;
			}
			return 1;
		}
		else
		{
			s=0;
			for(m=(i-1);m>=0;m--)
			{
				b[m]=a[m]-48;
				b[m]=b[m]*2;
				if(b[m]>9)
				{
					a[m]=b[m]%10+48+s;
					s=1;
				}
				else
				{
					a[m]=b[m]+48+s;
					s=0;
				}
			}
			return 0;
		}
		
	}
}
int main()
{
	int N,i=0,o,n=1;
	cin>>N;
	char a[100];
	for(o=0;o<100;o++)
	{
		a[o]='a';
	}
	if(N==0)
		cout<<"1";
	else
	{
		a[0]=49;
		while(i<N)
		{
			n=n+ss(a);
			i++;
		}
		for(o=0;o<n;o++)
		{
			cout<<a[o];
		}
	}	
	return 0;
}
int main()
{
    int x[50];
    int m;
    cin>>m;
    int n=40;
    int i;
    x[0]=1;     
    for(i=1;i<n;i++)
    {
                            x[i]=0;
    }//???? 
    for(int r=0;r<m;r++)
    {
        for(i=0;i<n;i++)
        {
                        x[i]*=2;
        }
        /*==================================*/
        for(i=0;i<n;i++)
        {
                        if(x[i]>=10)
                        {
                                    x[i+1]+=x[i]/10;
                                    x[i]=x[i]%10;
                        }//?? 
        }
    }
    int max;//????????
    for(max=n-1;max>0;max--)
    {
                            if(x[max]!=0)
                            break;
    }
    for (i=max;i>=0;i--)
    {
        cout<<x[i];
    }
    return 0;
}
void func(char* a)
{
	int lena=strlen(a),i,flag=0;
	for(i=0;i<lena;i++)
	{
		if(flag==0)
          a[i]=a[i]+a[i]-'0';
		else 
		  a[i]=a[i]+a[i]+1-'0';
        if(a[i]>'9')
          {
          	a[i]-=10; flag=1;
          }
        else flag=0;       
	}
	if(flag==1)
	 { 
	  a[i]='1';
	  a[i+1]='\0';
	 }
}
int main()
{
   char a[N];
   int n,i,len;
   a[0]='1';
   a[1]='\0';
   scanf("%d",&n);
   for(i=0;i<n;i++)
   func(a);
   len=strlen(a);
   for(i=len-1;i>=0;i--)
   printf("%c",a[i]);	
}
int main()
{
	int a[200] = {0}, i, flag = 0;
	a[199] = 1;
	int n;
	cin >> n;
	while (n != 0)
	{
		flag = 0;
		for (i = 199; i >= 0; i--)
		{
			if (a[i] * 2 >= 10)
			{
				a[i] = a[i] * 2 - 10 + flag;
				flag = 1;
			}
			else
			{
				a[i] = a[i] * 2 + flag;
				flag = 0;
			}
		}
		n--;
	}
	for (i = 0; a[i] == 0; i++)
	{}
	for (;i <= 199; i++)
	{
		cout << a[i];
	}

	return 0;
}
//
//	?????	??2?N??
//	?????	??2?N????
//	?????	?  ? ? ? ?? 1000012733 ?
//	?????	2010 ? 12 ? 18 ?
//
int main()
{
	int n, i, j, k, len, temp, l;			/*??????????????n??2?????????2??????i?j?k?l????????len??
											?????result????temp??????????????2?????????????????*/
	char result[1000];						//???????result????2???????
	int t[1000];							//??????t?????????2?????????????????
	memset ( result, 0, 1000 );				
	memset ( t, 0, sizeof ( t ));			//?????result?t??????
	cin >> n;								//?????????2????
	result[0] = '2';						//????result?????2
	for ( i = 1; i < n; i++ )				//??2?n?????? n - 1 ? ?????? n = 0 ? n = 1 ??????? ?
	{
		len = strlen ( result );			//???????result???
		k = 0;								//k???0
		memset ( t, 0, sizeof ( t ));		//?t????????
		for ( j = len - 1; j >=0; j-- )		//?????result??????????????
		{
			temp = result[j] - '0';			//??temp????????result?????????
			t[k] += temp * 2;				//??????????temp??2
			if ( t[k] >= 10 )				
			{
				t[k + 1] += 1;
				t[k] = t[k] - 10;
			}								//????????????????10???????
			k++;							//?????k??????1
		}
		if ( t[k] == 0 )					//???????????????????k??1?????????????
			k = k - 1;
		memset ( result, 0, 1000 );			//??result???????result??????
		for ( l = 0; l <= k; l++ )
		{
			result[k - l] = '0' + t[l];		//??????????????result???
		}
	}
	if ( n == 1 )
		cout << 2 << endl;					//??????2?1???????2
	else if ( n == 0)					
		cout << 1 << endl;					//??????2?0???????1
	else 
		cout << result << endl;				//???????2??????1????????result
	return 0;
}
int i,k,num[50]={0},temp[50]={0};
int mul()
{
	int m;
	for(m=0;m<50;m++)
	{
		temp[m]=temp[m]+num[m]*2;
		if(temp[m]>=10)
		{
			temp[m+1]++;
			temp[m]=temp[m]%10;
		}
	}
	for(m=0;m<50;m++)
		num[m]=temp[m];
	for(m=0;m<50;m++)
		temp[m]=0;
	return 0;
}
int main()
{
	cin>>k;
	num[0]=2;
	if(k!=0)
	{for(i=0;i<k-1;i++)
		mul();
	for(i=1;num[50-i]==0;i++);
	for(;i<=50;i++)
		cout<<num[50-i];}
	else
		cout<<1;

	return 0;
}
// 2011???.cpp : ??????????????

int num[100000];
void plu()
{
	int sub[100000];
	for(int i=0;i<110;i++) sub[i]=0;
	int k=0;
	while(num[k]!=-1)
	{
		sub[k]=num[k]*2%10+sub[k];
		sub[k+1]=num[k]*2/10;
		k++;
	}
	int j=60;
	while(sub[j]==0)
		{
			j--;
	    }
	for(int m=j;m>-1;m--)
		num[m]=sub[m];
}
int main()
{
	int n;
	cin>>n;
	if(n==1) {cout<<2;return 0;}
	if(n==0) {cout<<1;return 0;}
	for(int i=0;i<n;i++)
		num[i]=-1;
	num[0]=1;
	for(int j=0;j<n;j++)
	    plu();
    int k=0;
	while(num[k]!=-1)
		k++;
	for(int l=k-1;l>-1;l--)
		cout<<num[l];
	
	return 0;
}