semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
	int n,i,j,b[1000];
	scanf("%d",&n);
	b[0]=1;
	for(i=1;i<1000;i++){
		b[i]=0;
	}
	for(i=0;i<n;i++){
		j=1;
		b[0]=b[0]*2;
		for(j=1;1;j++){
			if(b[j]==0&&b[j+1]==0&&b[j+2]==0){
				b[j]=b[j-1]/10;
				b[j-1]=b[j-1]%10;
				break;
			}
			b[j]=b[j]*2+b[j-1]/10;
			b[j-1]=b[j-1]%10;
		}
	}
	if(n!=0){
	if(b[j]==0){
		j=j-1;
	}
	for(i=j;i>=0;i--){
		printf("%d",b[i]);
	}
	}
	if(n==0){
		printf("1");
	}
	return 0;
}
int main()
{
	int a[100]={0};
	a[0]=1;
	int n;
	cin>>n;
	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]-=10;
				a[j+1]++;
			}
		}
	}
	int len=0;
	for(int i=99;i>=0;i--)
	{
		if(a[i]!=0)
		{
			len=i;
			break;
		}
	}
	for(int i=len;i>=0;i--)
	{
		cout<<a[i];
	}
	cout<<endl;
	return 0;
}
int main()
{
	int n,i,j;
	int re[100];
	for(int x=0;x<100;x++)
		re[x]=0;
	cin>>n;
	if(n==0)
		cout<<"1"<<endl;
	else if(n==1)
		cout<<"2"<<endl;
	else
	{
		re[99]=2;
		for(i=1;i<n;i++)
		{
			j=99;
			while(j!=0)
			{
				re[j]=re[j]*2;
				j--;
			}
			j=99;
			while(j!=0)
			{
				if(re[j]>=10)
				{
					re[j-1]+=re[j]/10;
					re[j]=re[j]%10;
				}
				j--;
			}
		}
		j=0;
		while(re[j]==0)
			j++;
		for(;j<=99;j++)
			cout<<re[j];
		cout<<endl;
	}
	return 0;
}
//***************************************
//??2?N??
int main()
{
	int n;
	double a[1000]={0};
	cin>>n;
	a[999]=2;
	if(n==0)
		cout<<1;
	else
	{
		for(int i=0;i<n-1;i++)
			for(int j=999;j>=0;j--)
			{
				if(a[j]+a[j]<10)
					a[j]=a[j]*2;
				else
				{
					a[j]=a[j]*2-10;
					a[j-1]=0.5+a[j-1];
				}
			}
		int m=0;
		for(int i=0;i<1000;i++)
		{
			if(a[i]!=0)
			{
				cout<<a[i];
				m=i;
				break;
			}
		}
		for(int i=m+1;i<1000;i++)
			cout<<a[i];
	}
	return 0;
}
//***************************
//*?????2?N??        **
//*??????             **
//*???2013.11.15         **
//***************************
int main()
{ 
   int i,j,k,n;
   cin>>n;
   int a[52];
	if(n==0)
	{
		cout<<"1"<<endl;
	}
	else
	{
		for(i=0;i<=50;i++)
		{
			a[i]=0;
		}
		a[51]=1;
		for(i=0;i<n;i++)
		{
			for(j=51;j>=0;j--)
			{
				a[j]=a[j]*2;
			}
			for(k=51;k>=0;k--)
			{
				if(a[k]>=10)
				{
					a[k-1]+=a[k]/10;
					a[k]=a[k]%10;
				}
			}
		}
        for(i=0;i<=51;i++)
		{
			if(a[i]!=0)
			{
				k=i;
				break;
			}
		}
		for(j=k;j<=51;j++)
		{
			cout<<a[j];
		}
        cout<<endl;
		}
	return 0;
}
int main()
{
	int N;
	scanf("%d",&N);
	int i,sz[1000];
	double sum=1;
	for(i=1;i<=N;i++){
		sz[i]=2;
		sum=sum*sz[i];
	}
	printf("%.0lf",sum);
	return 0;
}
int main()
{
	int n=0,a[50],b[50],c=0,num=0,yushu=0;
	cin>>n;
	int i=0;
	a[0]=1;
	b[0]=1;
	for(i=1;i<50;i++)
	{
		a[i]=0;
		b[i]=0;
	}
	for(i=0;i<n;i++)
	{
		num=0;
		yushu=0;
		c=a[num]*2+yushu;
		if(c<10)
			b[num]=c;
		else if(c>=10)
		{
			b[num]=c%10;
			yushu=c/10;
		}
		num++;
		//while(a[num-1]!=0 && num-1>=0)
		while(num<50)
		{
			c=a[num]*2+yushu;
			if(c<10)
			{
				b[num]=c;
				yushu=0;
			}
			else if(c>=10)
			{
				b[num]=c%10;
				yushu=c/10;
			}
			num++;
		}
		for(int j=0;j<50;j++)
			a[j]=b[j];
	}
	i = 49;
	while(a[i--] == 0);

	for(i++;i>=0;i--)
	{
		//if(a[i]!=0)
		cout<<a[i];
	}
	return 0;
}
int main()
{
	int n;
	cin >> n;
	char a[200] = {0}, b[200] = {0} ;
	int c[200] = {0}, d[200] = {0};  
	
	a[0] =1 + '0';
	int i=0;

	char *p=a;
	while(i<n)
	{
		int j =0;
		
		while( j<strlen(a) )
		{
			c[j] = a[j] - '0';
			j++;
		}

		j=0;
		while (j<strlen(a))
		{
			c[j] = c[j]*2;
			j++;
		}
		
		j=0;
		while (j<strlen(a)+1)
		{
			c[j+1] += (c[j]/10);
			c[j] %= 10 ;
			
			j++;
		}

		j=199;
		while(c[j] == 0)
			j--;
		while ( j >= 0)
		{
			a[j] = c[j] + '0';
			j--;
		}

		i++;
	}
	
	i=0;
	for(  i=strlen(a)-1; i>=0; i--)
	{
		cout << a[i];
	}
	return 0;
}
char *mul(char *, char *);

int main()
{
	char str1[100000] = "1", str2[100000];
	int n, i;
	int length = strlen(str2);
	char *q = str1, *p = str2;;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		q = str1;
		p = mul(str1, str2);
		p--;
		for (; p >= str2; p--)
		{
			*q = *p;
			q++;
		}
	}
	cout << str1 << endl;
	return 0;
}
char *mul(char *num, char *str2)
{
	int length = strlen(num);
	char *p, *q;;
	p = num + length - 1;
	q = str2;
	int i, n = 0, m = 0, k = 0;
	for (i = 0; i < length; i++)
	{
		n = *p - '0';
		n = n * 2 + m;
		k = n % 10;
		m = n / 10;
		*q = k + '0';
		if (i != length - 1)
			p--;
		q++;
	}
	if (m != 0)
	{
		*q = m + '0';
		q++;
	}
	*q = '\0';
	return q;
}
int main()
{
	int n,num;
	cin>>n;
	int a[100];
	int i,j,k;
	for(i=0;i<100;i++)
	{
		a[i]=0;
	}
    a[99]=1;
	for(j=0;j<n;j++)
	{
		for(i=0;i<100;i++)
	{
		a[i]=a[i]*2;
		if(a[i]>=10)
		{
			a[i]=a[i]-10;
			a[i-1]=a[i-1]+1;
		}
	}
	}
for(i=0;i<100;i++)
{
	if(a[i]!=0)
	{
		num=i;
		break;
	}
}
for(i=num;i<100;i++)
{
	cout<<a[i];
}
}
int main()
{
	int flag=0;
    int k,i,j,sum[100001];
	cin>>k;
	memset(sum,0,sizeof(sum));
    sum[0]=1;
	for(i=0;i<k;i++)
	{
		for(j=0;j<=100000;j++)
		{
		   sum[j] *= 2;
		}
		for(j=0;j<=100000;j++)
		{
		   if(sum[j]>=10)
		   {
               sum[j]-=10;
		   	   sum[j+1]+=1;
		   }
		}

	}
	for(i=100000;i>=0;i--)
	{
		if(flag==0&&sum[i]==0)
			continue;
		else if(flag==0&&sum[i]!=0)
		{
			flag=1;
			cout<<sum[i];
		}
		else
			cout<<sum[i];
	}
	return 0;
}
/*
 * 2mi.cpp
 *
 *  Created on: 2011-12-31
 *      Author: 2011
 */
int main()
{
	int n,i,s[100],j;
	for(i=0;i<100;++i)
		s[i]=0;
	s[0]=1;
	cin>>n;
	for(i=0;i<n;i++)
	{
		for(j=0;j<100;j++)
		{
			s[j]=2*s[j];
		}		
		for(j=0;j<100;j++){
		if(s[j]>9)
			{
				s[j+1]=s[j+1]+1;
				s[j]=s[j]%10;
			}}

	}
	for(i=99;i>=0;i--)
		if(s[i]!=0)
			break;
		
	for(j=i;j>=0;j--)
		cout<<s[j];
cin>>n;
	return 0;
}
/*
 * 3.cpp
 *
 *  Created on: 2011-12-31
 *      Author: 2011
 */
int main(){
	int n,m;
	cin>>n;
	int i,carry=0,lenx=1;
	int y[405]={0};
	int x[405]={0};
	x[0]=1;
	for(m=1;m<=n;m++)
	{
		carry=0;
		for(i=0;i<lenx;i++)
			y[i]=0;
		for(i=0;i<lenx;i++){
			if(x[i]*2>=10){
				y[i]=x[i]*2-10+carry;
				carry=1;
			}
			else{
				y[i]=x[i]*2+carry;
				carry=0;
			}
		}
		if(carry==1){
			y[lenx]=1;
			lenx++;
		}
		for(i=0;i<lenx;i++)
			x[i]=y[i];
	}
	if(n==0)
		cout<<'1';
	else
		for(m=lenx-1;m>=0;m--)
			cout<<y[m];
	return 0;
}
//?????2?N??
//??????
//???2010.12.15

int g_a = 0;     //?????? g_a ????????????????1????0

int main()
{
	int n = 0;
	int a[100];      //???a???????????
	int i = 0;
	int j = 0;
	int flag = 0;

	memset(a,0,sizeof(a));

	cin >> n;

	a[99] = 1;       //a[99]?????
	for (i = 1; i <= n; i++)
		for (j = 99; j >= 50; j--)
		{
			if ((a[j] * 2 > 8) && (g_a == 1))        //??????????
				a[j] = a[j] * 2 - 9;
			else if ((a[j] * 2 > 8) && (g_a == 0))   //???????
				a[j] = a[j] * 2 - 10 + g_a++;
			else if ((a[j] * 2 <= 8) && (g_a == 1))  //???????
				a[j] = a[j] * 2 + g_a--;
			else if ((a[j] * 2 <= 8) && (g_a == 0))  //???
				a[j] = a[j] * 2;
		}


	for (i = 1; i <= 99; i++)
	{
		//?????????????? 0 ?????
		if ((a[i] == 0) && (flag == 0))
			continue;
		else
		{
			cout << a[i];
			flag = 1;
		}
	}

	return 0;
}
//**********************************
//????1000012825               *
//??????                     *
//???12.15                      *
//?????2?N??               *
//**********************************
int main ()
{
	int n, i ,j, a[101] = {0}, k;
	cin >> n;
	a[0] = 1;
	for ( i = 1; 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] = a[j] % 10;
				a[ j + 1 ]++;         //?????????????????????
			}
		}
	}
	for ( i = 100; a[i] == 0; i-- )
		k = i;
	for ( j = k - 1 ;j >= 0; j-- )   //?????0???????
		cout << a[j];
	cout << endl;
	return 0;
}
/*
 * 12.cpp
 *
 *  Created on: 2011-12-31
 *      Author: 2011
 */
/*
 * 13.cpp
 *
 *  Created on: 2011-12-31
 *      Author: 2011
 */
char a[1000] ;
int b[1000] ;
void chen() ;

int main()
{
	int n ,i,j;
	cin >> n ;
	a[0] = '1' ;
	for (i = 1 ; i<1000 ;i++)
		a[i] = '#' ;
	if (n == 0)
		cout << "1" ;
	else
	{	for (i = 1 ; i <= n ; i++)
			chen() ;
	for (i = 0 ; a[i] !='#' ; i++);
	for(j = i - 1 ; j>=0 ;j--)
		cout <<a[j] ;}
	return 0 ;
}

void chen()
{
	int carry = 0 ;
	int i ;
	for (i = 0 ;a[i]!= '#' ;i++)
	{
		b[i] =(a[i]-'0')* 2 + carry ;
		carry = b[i] / 10 ;
		b[i] = b[i] %10;
		a[i] =b[i] + '0' ;
	}
	if (carry)
		a[i] = carry + '0' ;
}
int main()
{
	int N, i, j, num = 1;
	int s[101] = {0};
	cin >> N;
	s[0] = 1;
	for (i = 0; i < N; i++)
	{
		for (j = 0; j < num; j++)
		{
			s[j] = s[j] * 2;
		}
		for (j = 0; j < num; j++)
		{
			if (s[j] >= 10) 
			{
				s[j] -= 10;
				s[j+1]++;
			}
		}
		if (s[num] == 1) num++;
	}
	for (i = num - 1; i >= 0; i--)
		cout << s[i];
	return 0;
}
int main()
{
	int n,m,i,j,num[101]={0};
	cin>>n;
	num[0]=2;
	if(n==0) cout<<'1'<<endl;
	else
	{
		while(n>1)
		{
			for(i=100;i>=0;i--)
			{
				if(num[i]!=0)
					break;
			}
			for(j=0;j<=i;j++)
			{
				num[j]=num[j]*2;
			}
			for(j=0;j<=i;j++)
			{
				if(num[j]>=10)
				{
					num[j]=num[j]-10;
					num[j+1]=num[j+1]+1;
				}
			}
			n--;
		}
		for(i=100;i>=0;i--)
		{
			if(num[i]!=0)
				break;
		}
		for(j=i;j>=0;j--)
			cout<<num[j];
		cout<<endl;
	}
		return 0;
}
int main()
{
    int n;
    cin>>n;
    int a[1001]={0};
    a[1000]=1;
    int i,j;
    while(n--)
    {
        for(i=1000;i>0;i--)
            a[i]*=2;       //????????*2
         for(i=1000;i>0;i--)
        {
            if(a[i]>=10)      //????????????10???
            {
                a[i]-=10;
                a[i-1]+=1;
            }
        }
    }
    for(i=0;i<=1000;i++)
    {
        if(a[i]!=0)
        {
            for(j=i;j<=1000;j++)       //??
            cout<<a[j];
            break;
        }
    }
    return 0;
}
/*
 * 3.cpp
 *
 *  Created on: 2011-12-31
 *      Author: 2011
 */
void times2(char *a,int length){
	int i,carry=0;
	for(i=0;i<length;i++){
		a[i]=a[i]*2+carry-'0';
		if(a[i]>'9'){
			a[i]=a[i]-10;
			carry=1;
		}
		else carry=0;
	}
	if(carry==1){
		a[length]='1';
	}
}
int main(){
	int n,i,length;
	cin>>n;
	char answer[100]="1";
	for(i=1;i<=n;i++){
		length=strlen(answer);
		times2(answer,length);
	}
	length=strlen(answer);
	for(i=length-1;i>=0;i--){
		cout<<answer[i];
	}
	cout<<endl;
	return 0;
}
int n;
int num=0;
int a[40]={0};
int b[40]={0};
int c[40]={0};
void calculate()
{
	int i;
	memset(b,0,sizeof(b));
	for(i=0;i<40;i++){
		b[i]=b[i]+(a[i]*2)%10;
		b[i+1]=(a[i]*2)/10+b[i+1];}
	for(i=0;i<40;i++)
		a[i]=b[i];





}
int main()
{
	cin>>n;
	
	int i=0,l=0;a[0]=1;
	for(i=0;i<=n-1;i++)	
calculate();
	for(i=39;a[i]==0;i--)
		l=i;
		
	for(i=l-1;i>=0;i--)
		cout<<a[i];




 	return 0;
}
int main()
{
    int a[100]={0},n,b,i,j,k;
    a[99]=1;
    cin>>n;
    for(i=0;i<n;i++)
    {
                    for(j=0;j<100;j++)
                    {
                                      if(a[j]*2>=10)
                                      {
                                                   a[j-1]++;
                                                   b=a[j]*2-10;
                                      }
                                      if(a[j]*2<10)
                                                   b=a[j]*2;
                                      a[j]=b;
                    }
    }
    for(j=0;j<100;j++)
    {
                      if(a[j]!=0)
                      {
                                 for(k=j;k<100;k++)
                                 cout<<a[k];
                                 break;
                      }
    }
    return 0;
}
int main()
{
	int a[101]={0},b[101]={0},I=0;
	a[0]=1;
	int n;
	cin>>n;
	for(int j=1;j<=n;j++)
	{
		for(int i=0;i<101;i++)
		{
			a[i]=a[i]*2;
			if(a[i]>=10)
			{
				a[i]-=10;
				b[i+1]++;
			}
		}
		for(int i=0;i<101;i++)
		{
			a[i]=a[i]+b[i];
			b[i]=0;
		}
	}
	for(int i=99;i>=0;i--)
	{
		if(a[i]!=0)I++;
		if(I>0)
			cout<<a[i];
	}
	return 0;
}
int main()
{
	int a[50] = {0}, i, j, k = 0, n, p = 48;
	cin >> n;
	a[49] = 1;
	for (i = 1; i <= n; i++)
	{
		for (j = 49; j >= p; j--)
		{
			a[j] = a[j] * 2 + k;
			if (a[j] >= 10)
			{
				k = 1;
				a[j] = a[j] - 10;
			}
			else k = 0;
		}
		if (a[p] > 0) p--;
	}
	while (a[p] == 0) p++;
	for (i = p; i <= 49; i++)
	{
		cout << a[i];
	}
	cout << endl;
	return 0;
}
//*****************************
//* ??????2?N??     ** 
//* ?????? 1300012948  ** 
//* ???2013.11.15         ** 
//*****************************
int main()
{
    int a[32] = {0}, n, p;
    cin >> n;
    a[0] = 1;
    for(int i = 1; i <= n; i++)
    {
            for(int j = 0; j < 32; j++) // ???????????? 
            {
                    a[j] = a[j] * 2;
            }
            for(int k = 0; k < 32; k++) // ????????????,??????,?????,???????? 
            {
                    if(a[k] >= 10)
                    {
                            a[k] -= 10;
                            a[k + 1]++;
                    }
            }
    }
    p = 31;
    while(a[p] == 0) // ????????? 
    {
               p--;
    }
    for( ; p >= 0; p--) // ???????? 
    {
         cout << a[p];
    }
    cout << endl;
    return 0;
}
int main()
{
	int n, i, j, a[35] = {0};
	a[1] = 1;
	cin >> n;
	if(n == 0) cout << a[1] <<endl;
	else
	{
		for(i = 1;i <= n;i++)
		{
			int flag[35] = {0};
			for(j = 1;  ;j++)
			{
				if(a[j]*2 <= 8)  
				{
					a[j] = a[j]*2 + flag[j-1];
					if(a[j+1] == 0 && a[j+2] ==0 &&a[j+3] == 0) break;
				}
				else if(a[j]*2 >= 10) 
				{
					a[j] = a[j]*2 - 10 + flag[j-1]; 
					flag[j] = 1;
					if(a[j+1] == 0 && a[j+2] == 0 && a[j+3] == 0) 
					{
						flag[j] = 0;
						a[j+1] = 1;
						break;
					}
				}	
			}
		}
		if(a[j+1] == 1) cout << a[j+1];
		for(i = j;i >= 1;i--)
			cout << a[i];
		cout << endl;
	}
	return 0;
}
//********************************
//*?????2?N??   **
//*?????? 1300012957 **
//*???2013.11.19  **
//********************************
int main ( )
{
	int n ;
	cin >> n ;
	double n1[101] = {0} ;
	int i,j ;
	if( n == 0 )
	{
		cout << 1 ;
	}                               //?????0????1
	else if( n != 0 )               //????0?
	{
		n1[0] = 2 ;                 //????2
		for( i = 1 ; i <= n - 1 ; i++ )
			                        //i????????????
		{
			for( j = 0 ; j <= 100 ; j++ )
				                    //j???????
						            //?????????2?????
			{
				n1[j] = n1[j] * 2 ; //???*2
				if( n1[j] >= 10 )   //??*2???10
				{
					n1[j+1] += 0.5 ;//??????*2?????0.5
					                //?*2???1
					n1[j] -= 10 ;   //?????????10
				}
			}
		}
		for( i = 100 ; i >= 0 ; i-- )
		{
			if( n1[i] != 0 )
				break ;             //???????????????i
		}
		for( j = i ; j >= 0 ; j-- ) //???????????????
			                        //??i???0??
		{
			cout << n1[j] ;         //??????
		}
	}
	return 0 ;
}
int main()
{
	int N, i, j, count, flag;
	char num[1000];
	for (i = 0; i < 1000; i++)
	{
		num[i] = '0';
	}
	num[0] = '1';
	cin >> N;
	for (i = 1; i <= N; i++)
	{
		count = 999;
		while (num[count] == '0')
			count--;
		count++;
		j = 0;
		flag = 0;
		while (j <= count)
		{
			num[j] = 2 * num[j] - '0';
			if (flag == 1)
			{
				num[j]++;
			}
			if (num[j] > '9')
			{
				num[j] -= 10;
				flag = 1;
			}
			else flag = 0;
			j++;
		}
	}
	count = 100;
	while (num[count] == '0')
		count--;
	for (i = count; i >= 0; i--)
	{
		cout << num[i];
	}
	cout << endl;
	return 0;
}
/*
 * file    homework 12_2
 * author  ??
 * date    2010-12-18
 * description
           ?????????2?n?????????
*/



int main()
{
	char s[50] = {'0'};
	int n, i, j, len, t, carry;               //carry ????
	cin >> n;
	s[0] = '1';
	len = 1;                                 // len??s???
	for (i = 1; i <= n; i++)                 // ??n?????
	{
		carry = 0;
		for (j = 0; j < len; j++)
		{
			t = carry + 2 * (s[j] - '0');
			if (t < 10)
			{
				s[j] = '0' + t;
				carry = 0;
			}
			else
			{
				s[j] = t - 10 + '0';
				carry = 1;
			}
		}
		if (carry == 1)                      // ???????????len++?s[len]='1'
		{
			s[len] = '1';
			len++;
		}
	}
	for (i = len - 1; i >=0; i--)
		cout << s[i];
	cout << endl;
	return 0;
}
int main()
{
	int i, n, m, flag = 0, k;
	int a[40] = {0};
	cin >> n;
	a[39] = 1;
	m = 0;
	for (k = 1; k <= n; k ++)
	{
		for (i = 39; i >= 1; i --)
		{
			if (a[i] >= 5)
			{
				a[i] = a[i] * 2 - 10 + m;
				m = 1;
			}
			else 
			{
				a[i] = a[i] * 2 + m;
				m = 0;
			}
		}
	}
	for (i = 0; i <= 39; i ++)
	{
		if (a[i] != 0)
			flag = 1;
		if (flag != 0)
			cout << a[i];
	}
	return 0;
}
int ans[50]={0,1};
void calc()
{
	int i,t=0;
	for(i=1;i<=40;i++)
	{
		ans[i]=ans[i]*2+t;
		t=ans[i]/10;
		ans[i]%=10;
	}
}
int main()
{
	int m,i,j;
	cin>>m;
	for(i=1;i<=m;i++)
		calc();
	j=0;
	for(i=40;i>=1;i--)
	{
		if(ans[i]!=0)j=1;
		if(j==1)cout<<ans[i];
	}
	return 0;
}
int a[100001]={0};

int main()
{
	int N;
	cin>>N;
	int i,j,p,q,x;
	a[0]=2;
	if(N==0)
	{
		cout<<1;
		exit(1);
	}
	else
	{
		for(i=1;i<=N-1;i++)
		{
			for(j=0;j<1000;j++)
			{
				a[j]=a[j]+a[j];
			}
			for(x=0;x<1000;x++)
			{
				if(a[x]>=10)
				{
					a[x]=a[x]-10;
					a[x+1]=a[x+1]+1;
				}
			}
		}
	}

	p=1000;
	while(a[p]==0)
	{
		p--;
	}

	for(q=p;q>=0;q--)
		cout<<a[q];
	return 0;
}
int main()
{
	int s=1,n,len1,len2,i,j,num1[100],num2[100],num3[40000]={0},flag;
	char str1[100]={0};
	cin>>n;
	if(n<32){
	for( i=0;i<n;i++)
		s*=2;
	 cout<<s;
	}
	else if(n>=32&&n<=60)
	{
		num1[9]=1,num1[8]=0,num1[7]=7,num1[6]=3,num1[5]=7,num1[4]=4,num1[3]=1,num1[2]=8,num1[1]=2,num1[0]=4;
	j=0;
	n=n-30;s=1;
	for(i=0;i<n;i++)
		s*=2;
	
	while(s>0){
	num2[j++]=s%10;//cout<<num2[j-1]<<endl;
	s/=10;
	}int len2=j;
	for(i=0;i<10;i++)
	{	for(j=0;j<len2;j++)
		{
			num3[i+j]=num3[i+j]+num1[i]*num2[j];
			while(num3[i+j]>=10)
			{
				num3[i+j]-=10;
				num3[i+j+1]++;
			}
		}
	}
	for(i=30000;i>=0;i--)
	{
		if(num3[i]!=0)
		{	flag=i;break;
		}
	}
    for(i=flag;i>=0;i--)
	{
		cout<<num3[i];
	}
}
else if(n>60&&n<=90)
	{
		num1[18]=1,num1[17]=1,num1[16]=5,num1[15]=2,num1[14]=9,num1[13]=2,num1[12]=1,num1[11]=5,num1[10]=0,num1[9]=4,num1[8]=6,num1[7]=0,num1[6]=6,num1[5]=8,num1[4]=4,num1[3]=6,num1[2]=9,num1[1]=7,num1[0]=6;
	j=0;
	n=n-60;s=1;
	for(i=0;i<n;i++)
		s*=2;
	
	while(s>0){
	num2[j++]=s%10;//cout<<num2[j-1]<<endl;
	s/=10;
	}int len2=j;
	for(i=0;i<19;i++)
	{	for(j=0;j<len2;j++)
		{
			num3[i+j]=num3[i+j]+num1[i]*num2[j];
			while(num3[i+j]>=10)
			{
				num3[i+j]-=10;
				num3[i+j+1]++;
			}
		}
	}

	for(i=30000;i>=0;i--)
	{
		if(num3[i]!=0)
		{	flag=i;break;
		}
	}
    for(i=flag;i>=0;i--)
	{
		cout<<num3[i];
	}
}

else if(n>90)
	{
		num1[22]=3,num1[21]=7,num1[20]=7,num1[19]=7,num1[18]=8,num1[17]=9,num1[16]=3,num1[15]=1,num1[14]=8,num1[13]=6,num1[12]=2,num1[11]=9,num1[10]=5,num1[9]=7,num1[8]=1,num1[7]=6,num1[6]=1,num1[5]=7,num1[4]=0,num1[3]=9,num1[2]=5,num1[1]=6,num1[0]=8;
	j=0;
	n=n-75;s=1;
	for(i=0;i<n;i++)
		s*=2;
	
	while(s>0){
	num2[j++]=s%10;//cout<<num2[j-1]<<endl;
	s/=10;
	}int len2=j;
	for(i=0;i<23;i++)
	{	for(j=0;j<len2;j++)
		{
			num3[i+j]=num3[i+j]+num1[i]*num2[j];
			while(num3[i+j]>=10)
			{
				num3[i+j]-=10;
				num3[i+j+1]++;
			}
		}
	}

	for(i=30000;i>=0;i--)
	{
		if(num3[i]!=0)
		{	flag=i;break;
		}
	}
    for(i=flag;i>=0;i--)
	{
		cout<<num3[i];
	}
}


//	4294967296


return 0;
}
void exponent(int a[], int n);
int main()
{
	int n;
	int a[200];
	int i;
	memset(a, 0, sizeof(a));
	a[0] = 1;
	cin >> n;
	exponent(a, n);
	for(i = 199; a[i] == 0; i--);
	for(;i >= 0;i--)
	{
		cout << a[i];
	}
	return 0;
}
void exponent(int a[], int n)
{
	if(n == 0)
		return;
	else
	{
		int i, k;
		for(i = 199; a[i] == 0; i--);
		for(k = 0; k <= i; k++)
		{
			a[k] = a[k] * 2;
		}
		for(k = 0; k <= i; k++)
		{
			a[k + 1] = a[k] / 10 + a[k + 1];
			a[k] = a[k] % 10;
		}
		exponent(a, n - 1);
		return;

	}
}
int main()
{
	char num[10000] , a ;
	int n , i , len = 1 , k ;
	cin >> n ;
	cin.get() ;
	num[0] = '1' ;
	for ( i = 1 ; i <= n ; i++ )
	{
		if ( ( num[0] + num[0] ) > ( '9' + '0' ) )
		{
			len++ ;
			for ( k = len - 1 ; k >= 1 ; k-- )
			{
				num[k] = num[k-1] ;
			}
			num[0] = '1' ;
			if ( len > 2 )
			{
				for ( k = 1 ; k <= len - 2 ; k++ )
				{
					if ( ( num[k] + num[k] ) > ( '9' + '0' ) )
					{
						num[k] = num[k] + num[k] - '9' - '1' + '0' ;
					    if ( ( num[k+1] + num[k+1] ) > ( '9' + '0' ) )
							num[k] = num[k] + '1' - '0' ;
					}
					else
					{ 
						num[k] = num[k] + num[k] - '0' ;
					    if ( ( num[k+1] + num[k+1] ) > ( '9' + '0' ) )
							num[k] = num[k] + '1' - '0' ;
					}
				}
			}
			if ( ( num[len-1] + num[len-1] ) > ( '9' + '0' ) )
			{
				num[len-1] = num[len-1] + num[len-1] - '9' - '1' + '0' ;
			}
			else
			{
				num[len-1] = num[len-1] + num[len-1] - '0' ;
			}
		}
		else
		{
			if ( len > 1 )
			{
				for ( k = 0 ; k <= len - 2 ; k++ )
				{
					if ( ( num[k] + num[k] ) > ( '9' + '0' ) )
					{
						num[k] = num[k] + num[k] - '9' - '1' + '0' ;
						if ( ( num[k+1] + num[k+1] ) > ( '9' + '0' ) )
							num[k] = num[k] + '1' - '0' ;
					}
					else
					{
						num[k] = num[k] + num[k] - '0' ;
						if ( ( num[k+1] + num[k+1] ) > ( '9' + '0' ) )
							num[k] = num[k] + '1' - '0' ;
					}
				}
			}
			if ( ( num[len-1] + num[len-1] ) > ( '9' + '0' ) )
			{
				num[len-1] = num[len-1] + num[len-1] - '9' - '1' + '0' ;
			}
			else
			{
				num[len-1] = num[len-1] + num[len-1] - '0' ;
			}
		}
	}
	for ( k = 0 ; k <= len - 1 ; k++ )
			cout << num[k] ;
	cout << endl ;
	return 0 ;
}
/*        ??2?N??
??????           2010.12.15       */

void mul(int, int *);//??2??
void out(int *);//??

int main()
{
	int n;
	int a[40] = {1};//????????
	cin >> n;
	mul(n, a);
	return 0;
}

void mul(int n,int *a)
{
	if(n == 0)
	{
		out(a);
		return ;
	}
	int i;
	for(i = 0; i < 40; i++)
		a[i] = a[i] * 2;//???2
	for(i = 0; i < 40; i++)
		if(a[i] > 9)
		{
			a[i] = a[i] - 10;
			a[i+1]++;//??
		}
	mul(n - 1,a);//????2
}

void out(int *a)
{
	int i, fla = 1;
	for(i = 39; i >= 0; i--)
	{
		if(fla == 0)
			cout << a[i];
		if(a[i] > 0 && fla == 1)//??????
		{
			fla = 0;//????????
			cout << a[i];
		}
	}
	cout << endl;
}
int main()
{
	int n,i,j,k;
	cin>>n;
	int num[50]={0};
	num[1]=2;
	for(i=1;i<n;i++)
	{
		k=49;
		while(num[k]==0)
			k--;
		for(j=1;j<=k+1;j++)
		{
			num[j]*=2;
			if(num[j-1]>=10)
			{
				num[j-1]-=10;
				num[j]++;
			}
		}
	}
	if(n==0)
		cout<<1<<endl;
	else
	{
		k=49;
		while(num[k]==0)
			k--;
		for(i=k;i>0;i--)
			cout<<num[i];
		cout<<endl;
	}
	return 0;
}
int main ()
{
    char a[100]={0};
    a[99]=2;
    int n;
    cin >>n; 
    for (int j=1;j<=n-1;j++)
    {
        for (int i=99;i>=0;i--)
        {
            a[i]=a[i]*2;
        }
		for (int i=99;i>=0;i--)
		{
			if (a[i]>=10)
            {
                a[i]=a[i]-10;
                a[i-1]=a[i-1]+1;
            }
		}
    }
    int m=0;
    for (int i=0;i<=99;i++)
    {
        if (a[i]!=0)
        {
            m=i;
            break;
        }
    }
	if (n!=0)
	{
		for (int i=m;i<=99;i++)
			putchar(a[i]+48);
	}
	else
		cout <<"1";
    return 0;
}
int main ()
{
	int N ;
	cin >> N ;
	int num[1000] = {0} ;
	num[999] = 1 ;
	for (int i = 1 ; i <= N ; i ++)
	{
		for (int j = 999 ; j >= 1 ; j --)
		{
			num[j] *= 2 ;
		}
		for (int j = 999 ; j >= 1 ; j --)
		{
			num[j - 1] += num[j] / 10 ;
			num[j] = num[j] % 10 ;
		}
	}
	int b = 0 ;
	while (num[b] == 0)
		  b ++ ;
	for (  ; b <= 999 ; b ++)
		cout << num[b] ;
	
	return 0 ;
}
int n, num[100];
void multi()
{
	int pos = 0, step;
	while(num[pos] == 0)
	{
		pos++;
	}		
	for(int i = 99; i >= pos; i--)
		num[i] *= 2;
	for(int i = 99; i >= pos; i--)
	{
		if(num[i] >= 10)
		{
			step = num[i] / 10;
			num[i - 1] += step;
			num[i] = num[i] % 10;
		}
	}
}	
int main()
{
	int p = 0;
	cin >> n;
	if(n == 0)
		cout << 1 << endl;
	else
	{
		memset(num, 0, 100);
		num[99] = 2;
		for(int i = 1; i < n; i++)
			multi();
		while(num[p] == 0)
		{
			p++;
		}
		for(; p < 100; p++)
			cout << num[p];
	}
	return 0;
}
int a[1000]={0};
long sum=1;
void mi(int);
int main()
{
	int n,i,j=1;
	a[0]=4;a[1]=2;a[2]=0;a[3]=1;
	cin>>n;
	if(n==0)cout<<1<<endl;
	else if(n<=10)
	{
		for(i=0;i<n;i++)
			j*=2;
		cout<<j<<endl;
	}
	else mi(n-10);
	return 0;
}
void mi(int n)
{
	int i,j,len=0;
	if(n==0)
	{
		for(i=999;i>=0;i--)
		{
			if(a[i]!=0)
				break;
		}
		for(j=i;j>=0;j--)
			cout<<a[j];
	}
	else 
	{
		for(len=999;len>=0;len--)
			if(a[len]!=0)break;
		for(i=0;i<=len;i++)
			a[i]*=2;
		for(i=0;i<=len;i++)                                       //????????????????
			if(a[i]>9)
			{
				a[i+1]++;
				a[i]-=10;
			}
		mi(n-1);
	}
}