semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int a[500] = {0};
	int n , i , j , flag = 0;
	cin >> n;
	a[499] = 1;
	for (i = 1 ; i <= n ; i++)
	{
		for (j = 499 ; j >= 0 ; j--)
		{
			a[j] *= 2;
			
		}
		for (j = 499 ; j >= 1 ; j--)
		{
			a[j - 1] += a[j] / 10;
			a[j] = a[j] % 10;
		}

		a[0] = a[0] % 10;
	}
	for (i = 0 ; i <= 499 ; i++)
	{
		if (flag == 0)
		{
			if (a[i] != 0)
			{
				flag = 1;
				cout << a[i];
			}
		}
		else
		{
			cout << a[i];
		}
	}
	cout << endl;
	return 0;
}
/*
 * ??2?N??.cpp
 *
 *  Created on: 2012-12-31
 *      Author: i
 */
int main(){
	int num[40]={0},temp[40]={0},n=0,i=0;
	num[0]=1;temp[0]=1;
	cin>>n;
	while(n--){
		for(i=0;i<40;i++){
			if(num[i]+temp[i]<10)temp[i]=num[i]+temp[i];
			else {
				temp[i]=num[i]+temp[i]-10;
				temp[i+1]++;
			}
		}
		for(i=0;i<40;i++){
			num[i]=temp[i];
		}
	}
	n=0;
	for(i=39;i>=0;i--){
		if(n!=0||num[i]!=0){
			cout<<num[i];
			n++;
		}
	}
	return 0;
}
int result[100];
int main()
{
    int n;
    cin >> n;
    int i, j, size = 1, c = 0;
    memset(result, 0 ,sizeof(result));
    result[0] = 1;
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < size; j++)
        {
            result[j] = result[j] * 2 + c ;
            c = result[j]/10;
            if (result[j] >= 10)
            {
                result[j] = result[j] % 10;
                if (j == size - 1)
                {
                    size++;
                }
            }
        }
    }
    for(j = size - 1; j >= 0; j--)
    {
        cout << result[j];
    }
    return 0;
}
int main()
{
	char a[1001];
	a[0] = '2';
	int b, i, j, k = 0, k1 = 0;
	cin >> b;
	if (b == 0)
		cout << "1" << endl;
	else
	{
		for (i = 1; i < 1001; i++)
			a[i] = '0';
		for (i = 1; i < b; i++)
		{
			for (j = 0; j <1001; j++)
			{
				k = (a[j] - '0') * 2 / 10;
				a[j] = (a[j] - '0') * 2 % 10 + k1 + '0'; 
				k1 = k;
			}
		}
		k = 0;
		for(i = 1000; i >= 0; i--)
		{
			if (a[i] !='0')
				k = 1;
			if (k == 1)
				cout << a[i];
		}
		cout << endl;
				
	}
	return 0;
}
/*-----------------------------------------*\
|? ? ?   ???2?N??           	    |
|? ?      ????	                    |
|? ? ? ??2010 ? 12 ? 15 ?		    |
|? ?      ?1000012758		            |
\*-----------------------------------------*/
int main()
{
	int n, a[100] = {1}, Len = 0;
	cin >> n;
	for (int i = 0; i < n; i++)
		for (int j = Len; j >= 0; j--)
		{
			a[j] *= 2;
			if (a[j] >= 10)
			{
				a[j + 1] += a[j] / 10;
				a[j] %= 10;
				if (j + 1 > Len)
					Len = j + 1;
			}
		}
	for (int i = Len; i >= 0; i--)
		cout << a[i];
	return 0;
}
int main()
{
	double m = 1;
	int n, i;
	cin >> n;
	for (i = 1; i <= n; i++)
		m = m * 2;
	cout << setprecision(0) << fixed;
	cout << m;

}
int main()
{
	int n ;
	cin>>n ;
	char a[40] ;
	for(int y = 0 ; y <= 39 ; y++)
	{
		a[y] = '0' ;
	}
    a[0] = '1' ;
	int b[40] = {0} ;
	int c = 0 ;
	for(int i = 0 ; i<n ; i++)
	{
		for(int j = 0 ; j<=39 ; j++)
		{
			b[j] = (int)((a[j] - '0') * 2 + c) ;
			c = 0 ;
			if(b[j]>=10)
			{
				a[j] = (char)(b[j] - 10 + '0') ;
				c = 1 ;
			}
			else
			{
				a[j] = (char)(b[j]+'0') ;
			}
		}
	}
	int k = 39 ;
	for( ; k>=0 ; k--)
	{
		if((a[k]-'0')!=0)
			break ;
	}
	for(; k>=0 ; k--)
	{
		cout<<a[k] ;
	}
	return 0;
}
//??(11-12) ??2?N?? ??? 20121231

int A[1000]={1};

void m2(int n)
{
    int d=0;
    for(int i=0;i<=n;i++)
    {
        A[i]=A[i]*2+d;
        d=A[i]/10;
        A[i]%=10;
    }
    return;
}

int main()
{
    int n;
    cin>>n;
    for(int i=1;i<=n;i++) m2(i);

    int i=999;
    while(A[i]==0) i--;
    while(i>=0) cout<<A[i],i--;
    return 0;
}
//****************************************************
//*  ????1000012846_2.cpp  ***********************
//*  ?????  *************************************
//*  ????:2010?12?  ****************************
//*  ???????2?N??  *************************
//****************************************************
//???????????Cheng,?????????????str[]??????????N
void Cheng ( char str [40] , int N )
{
	if ( N == 1 )        //????????
		cout << str ;
	else if ( N > 1 )    //??????2???
	{
		int num1[40] = {0} , num2[40] , len = 0 , i = 0 , k = 40 ;
		len = strlen(str) ;
		for ( i = 0 ; i < len ; i++ )         //?????????????
			num1[i] = str[len-1-i] - '0' ;    
		for ( i = 0 ; i < 40 ; i++ )    //????
			num2[i] = num1[i] * 2 ;
		for ( i = 0 ; i < 40 ; i++ )     //????
		{
			if ( num2[i] > 9 )
			{
				num2[i] -= 10 ;
				num2[i+1] += 1 ;
			}
		}
		while ( num2[k-1] == 0 )      //???????????????
			k-- ;
		for ( i = 0 ; i < k ; i++ )     //?????????????
			str[i] = num2[k-1-i] + '0' ;
		str[k] = '\0' ;     
		Cheng(str,N-1) ;    //??????
	}
}
int main()
{
	char str[40] = "2" ;  //????????
	int N ;
	cin >> N ;
	if ( N == 0 )       //?N=0?????1
		cout << "1" << endl ;
	else
		Cheng ( str , N ) ;   //????
	return 0 ;
}
int main()
{
	int trans,decimal = 0,i,len;
	char num[910000]={'0'};
	num[0]='2';
	long int p;
	cin >> p;
	if (p == 0)
	{
		cout << '1' << endl;
		return 0;
	}
	while(p -1)
	{
		decimal = 0;
		len = strlen(num);
		for (i = 0; i < len; i++)
		{
			trans = (num[i] -'0') * 2 + decimal;
			if (trans>=10)
			{
				trans-=10;
				num[i] = '0'+trans;
				decimal = 1;
			}
			else
			{
				num[i]='0'+ trans;
				decimal = 0;
			}
		}
		if (decimal)
		{
			num[i] = '1';
			num[i+1] = '\0';
		}
		else
		{
			num[i] = '\0';
		}
		p--;
	}
	len = strlen(num);
	for (i = len-1; i>=0; i--)
	{
		cout << num[i];
	}
	cout << endl;
	    return 0;
}
//********************************
//*???2?n??
//*??? ?? 1300012814  **
//*???2013.11,14  **
//********************************
int main()
{
	int n, a[100] = {1};

	cin >>n;
	for (int i = 1; i<=n;i++)
	{
	for (int j = 0;j < 100;j++)
    {
	a[j] = 2 * a[j];
	}
	for (int j = 0; j<100;j++)
	{
	if (a[j] >= 10)
	{
	a[j+1]++;
	a[j] = a[j]%10;
	}
	}
	}
	int j = 99;
	while (a[j]==0)
	{
		j--;
	}
	for (;j>=0;j--)
	{
	cout << a[j];
	}

	return 0;
}
int main()
{
	int n, i, j, m, l, k;
	char s[300];
	cin >> n;
	s[0] = '1';
	k = 1;
	for(i = 0; i < n; i++)
	{
		l = 0;
	    for(j = 0; j < k; j++)
		{
			m = s[j] - '0';
			m = 2 * m + l;
			l = m / 10;
			m = m % 10;
			s[j] = m + '0';
		}
		if(l != 0)
		{
			s[j] = l + '0';
			k++;
		}
	}
	for(i = k - 1; i >= 0; i--)
		cout << s[i];
	return 0;
}
int main()
{
	int x, length = 1, i;
	char result[51];
	for (i = 1; i < 51; i++)
		result[i] = '0';
	result[0] = '1';
	for (cin >> x; x > 0; x--)
	{
		for (i = 0; i < length; i++)
			result[i] = result[i] * 2 - '0';
		for (i = 0; i < length - 1; i++)
			if (result[i] > '9')
			{
				result[i] -= 10;
				result[i + 1]++;
			}
		if (result[i] > '9')
		{
			result[i] -= 10;
			result[i + 1]++;
			length++;
		}
	}
	for (length--; length >= 0; length--)
		cout << result[length];
	return 0;
}
int main()
{
	int a[100]={1},*p;
	int n;cin>>n;
	if(n==0)
	{cout<<1;return 0;}
	for(int i=0;i<n;i++)
	{
		p=a;
		for(int j=0;*p!=0||*(p+1)!=0||*(p+2)!=0;j++)
		{
			*p=(*p)*2;
			p++;
		}
		for(int *q=a;*q!=0||*(q+1)!=0||*(q+2)!=0;q++)
		{
			if(*q>=10)
			{*q=*q-10;*(q+1)=*(q+1)+1;}
		}
	}
	if(*p==0)
		p--;
	while(p!=a)
	{cout<<*p;p--;}
	cout<<*p;
	return 0;
}
int main ()
{
	int n, i, j,flag = 0;
	int num[32] = {0};

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

	if(n != 0)
	{
		for(j = 31; j >= 0; j--)
		{
			if(num[j] == 0 && flag == 0)
				continue;
			else
				flag = 1;
			if(flag == 1)
				cout << num[j];
		}
	}
	else
		cout << "1";
	cout << endl;

	return 0;
}
/*???????2?N??
 *??????
 *???2010/12/16
 *???1000010449
 */
void multiply(char *p)	//?2
{
	int num[70], i = 0, end;

	num[0] = 0;	//?????????
	while (*(p + i) != '\0')
	{
		num[i + 1] = 2 * (*(p + i) - '0');
		i++;
	}

	end = i;	//?????
	for (; i > 0; i--)	//??
	{
		num[i - 1] += num[i] / 10;
		num[i] %= 10;
	}
	if (num[0] == 0)	//????0???????
		i = 1;
	else 
		i = 0;

	while (i <= end)
		*p++ = num[i++] + '0';
	*p = '\0';

	return;
}
int main()
{
	char result[71] = "1";
	int n, i;
	
	cin >> n;

	for (i = 0; i < n; i++)
		multiply(result);	//?n?
	

	cout << result << endl;

	return 0;
}
//****************************************
//???????2?N??
//??????
//?????2010.12.18
//???????2?N??
//****************************************
int main ()
{
	int N, i, j, m;//???????????i,j,m
	unsigned a[31],b[31];//???????????
	
	memset(a,0,sizeof(a));//?a????
	a[0] = 1;
	for (i = 1; i < 31; i++)
		a[i] = 0;//?a????1
	cin >> N;
	if (N == 0)
		cout << "1" << endl;//???0??????1
	else 
	{
		for(m = 0; m < N; m++) 
		{
			memset(b,0,sizeof(b));//??????b????
			i = 30;
			while(a[i] == 0) i--;//?????????
			//??????2
			for ( j = 0; j <= i; j++)
				b[j] = a[j] * 2;
			for ( j = 0; j < i + 1; j++)
			{
				//??10???
				if ( b[j] >= 10)
				{
					b[j + 1] += b[j] / 10;
					b[j] %= 10;
				}
			}
			//?a????????2
			for (j = 0; j < i + 2; j++)
				a[j] = b[j];
		}
		j = i + 1;
		while ( b[j] == 0) j--;//????????????
		for (; j >= 0; j--)
			cout << b[j];
		cout << endl;
	}
	return 0;
}
int main(){
	int n;
	scanf("%d",&n);
	int result1[MAX];
	int i;
	for(i=0;i<MAX;i++){
		result1[i]=0;
	}
	int p=1;
	int j=0;
	result1[0]=1;
	for(i=0;i<n;i++){
		for(j=0;j<MAX;j++){
			result1[j]=result1[j]*2;
		}
		for(j=0;j<MAX;j++){
			if(result1[j]>9){
			result1[j]=result1[j]-10;
			result1[j+1]++;
			}
		}
	}
	int m[MAX];
	for(i=0;i<MAX;i++){
		m[i]=result1[MAX-1-i];
	}
	j=0;
	while(j<MAX){
		if(m[j]==0){
			j++;
		}else{
			break;
		}
	}
	for(i=j;i<MAX;i++){
		printf("%d",m[i]);
	}
	printf("\n");
	return 0;
}
int main()
{
	int N, num[40] = {0}, i, j, x = 0, t;
	cin >> N;
	if (N == 0)
		cout << 1 << endl;
	else
	{
		num[0] = 1;
		for (i = 0; i < N; i++)
		{
			for (j = 0; j < 40; j++)
			{
				t = x;
				x = num[j] * 2 / 10;
				num[j] = num[j] * 2 % 10 + t;
			}
		}
		i = 39;
		while (num[i] == 0)
			i--;
		for (; i >= 0; i--)
			cout << num[i];
		cout << endl;
	}
	return 0;
}
int main()
{
	int n;
	int t=1,sig;
	int num;
	int s=0;
	cin>>n;
	char a[110];
	for(int i=1;i<=109;i++)
		a[i]='*';
	a[1]='2';
	if(n==0)
		cout<<1<<endl;
	else if(n==1)
		cout<<2<<endl;
	else if(n!=0&&n!=1)
	{
		
		for(int i=1;i<=n-1;i++)
		{
			sig=t;
			for(int j=1;j<=sig;j++)
			{
				num=a[j]-48;
				num=2*num+s;
			    s=0;
				if(num<10)
					a[j]=num+48;
				else
				{
					a[j]=num+38;
					if(a[j+1]=='*')
					{
						a[j+1]='1';
						t++;
					}
					else
					{
					  s=1;
					}
				}
			}
		}
		for(int i=109;i>=1;i--)
			if(a[i]!='*')
			{
				cout<<a[i];
			}
	}
	return 0;
}
// * * * * * * * * * * * * * * *
// *?????2?N??         *
// *??????  1300013011   *
// *???2013.11.17           *
// * * * * * * * * * * * * * * *
int main()
{
	int n, num[1000] = {0}, i, j, len;
	cin >> n;
	num[0] = 1;   // ??????????1????0
	
	for (i = 1; i <= n; i++)
	{
		for (j = 999; j >= 0; j--)
		{
			if (num[j] != 0)
			{
				len = j;   // ????0???????
				break;
			}
		}
		
		for (j = 0; j <= len; j++)
			num[j] *= 2;             // ??????0???????2
		for (j = 0; j <= len; j++)
		{
			if (num[j] >= 10)       // ?????????9????????
			{
				num[j + 1] += num[j] / 10;
				num[j] = num[j] % 10;
			}
		}
	}
	for (j = 999; j >= 0; j--)  // ??????????0??
	{
		if (num[j] != 0)
		{
			len = j;
			break;
		}
	}
	for (i = len; i >= 0; i--)   // ??????0????????
		cout << num[i];
	cout << endl;
	return 0;
}
/* Name        : ??2?N?? 
 * Version     : 1.0
 * Date        : 2012-12-24
 * New         : Null
 * Description : 
 * State       : Design
 */
int main()
{
    int a[33]={1},Bit[33]={0};                   //???a[33]?????????????????????Bit[33]??????????a[]?? 
    int N;
    cin>>N;
    for(int i=0;i<N;i++)
    {
        for(int j=0;j<32;j++)                    //????a[0]?????????????a[32]?Bit[32]???????Bit[33]??? 
        {
            a[j]=2*a[j]+Bit[j];                  //????????????????? 
            if(a[j]>9)                           //???????????????????????????Bit??1 
            {
                a[j]=a[j]-10;
                Bit[j+1]=1;
            }
            else Bit[j+1]=0;                     //????Bit??0??????????????????? 
        }
    }
    for(int i=31,Begin=0;i>=0;i--)               //????a[31]?????a[0]????????Begin?????????????0????? 
    {
        if(a[i]!=0)Begin=1;                      //???????0???Begin???1??????? 
        if(Begin==1)cout<<a[i];
    }
    cout<<endl;
    return 0;
}
int num[36];

void mult ()
{
	int i;
	for (i=0;i<35;i++)
		num[i]=num[i]*2;
	for (i=0;i<35;i++)
	{
		num[i+1]=num[i+1]+num[i]/10;
		num[i]=num[i]%10;
	}
}

int main()
{
    num[0]=1;
	int i,n;
	cin>>n;
	for (i=1;i<=n;i++) mult();
	int flag=0;
	for (i=35;i>=0;i--)
	{
		if (num[i]!=0) flag=1;
		if (flag==1) cout<<num[i];
	}
	return 0;
}
int main()
{
	char str[100];
	int num[100],i;
	memset(str,0,sizeof(str));
	memset(num,0,sizeof(num));
	int N;
	cin>>N;
	if(N==0) cout<<1<<endl;
	else{
	str[0] = 2;
	num[0] = 2;
	while(N>1)
	{
		N--;
		for(i=0;i<100;i++)
		{
			num[i] = num[i]*2;
		}
		for(i=0;i<100;i++)
		{
			if(num[i]>=10)
			{
				num[i] = num[i]-10;
				num[i+1]++;
			}
		}
	}
	int k=99;
	while(num[k]==0 && k>0) k--;
	for(i=k;i>=0;i--)
		cout<<num[i];
	cout<<endl;
	}
	return 0;
}
//****************************
//**Title:??2?N??      **
//**Author:?? 1300012732  **
//**Date?2013.11.16        **
//**File?5.cpp             **
//****************************

int main()
{
	int n, i, j;
	cin >> n;
	int a[32] = {1};
	for (i = 0; i < n; i++)
	{
		for (j = 0; j < 32; j++)
			a[j] *= 2;
		for (j = 0; j < 32; j++)
		{
			if (a[j] >= 10)
			{
				a[j]-=10;
				a[j+1]++;
			}
		}
	}
	for (i = 31; i >= 0; i--)
	{
		if (a[i] != 0)
			break;
	}
	for (j = i; j >= 0; j--)
		cout << a[j];
	cout<<endl;
	return 0;
}
int main()
{
	int N, i, j, t = 0, result[1000] = {0};
	cin >> N;
	result[0] = 1;
	for (i = 0; i < N; i++)
	{
		result[0] = result[0] * 2;
		for (j = 0; j < 100; j++)
		{
			if (result[j] > 9)
			{
				result[j + 1] = result[j + 1] * 2 + 1;
				result[j] = result[j] - 10;
			}
			else
			{
				result[j + 1] = result[j + 1] * 2;
			}
		}
	}
	for (i = 90; i > 0; i--)
		if(result[i] != 0)
		{
			t = i;
			break;
		}
	for (i = t; i >= 0; i--)
		cout << result[i]; 
	return 0;
}
/*
name:??2?N??
writer:???
time:2013.11.14
*/
int main ()
{
	int n , i , num , j , len = 1 , m ;
	char str[100] ;
	memset(str,'0',99);              //???
	str[99] = '1' ;                  //??????0
	cin >> n ;                       //????
	for ( i = 1 ; i <= n ; i++ )
	{
		for ( j = 100 - len ; j <= 99 ; j++ )
		{
			num = str[j] - '0' ;
			if ( str[j] <= '4' )
				str[j] = str[j] + num ;                     //0-4????
			else
			{
				str[j] = str[j] + num - 10 ;                //5-9????10
				for ( m = j - 1 ;;m--)
				{
					if ( m == 99 - len )                    //????
						len++;
	    			if ( str[m] == '9' )                    //??
					{
	        			str[m] = '0';
						str[m-1] ++ ;
					}
					else 
					{
						str[m]++ ;
						break ;
					}
				}
			}
		}
	}
	for ( j = 100 - len ; j <= 99 ; j++ )                   //??????
		cout << str[j] ;
	cout << endl ;
	return 0 ;
}
int main()
{
	int a[200] = {0}, i, j, k, n, t;
	cin >> n;
	a[0] = 1;
	for (i = 1; i <= n; i++)
	{
		for (j = 0; j < 200; j++)
			a[j] *= 2;
		t = a[0] / 10;
		a[0] %= 10;
		for (j = 1; j < 200; j++)
		{
			a[j] = t + a[j];
			t = a[j] / 10;
			a[j] %= 10;
		}
	}
	for (i = 199; i >= 0; i--)
	{
		if (a[i] != 0)
		{
			k = i;
			break;
		}
	}
	for (i = k; i >= 0; i--)
		cout << a[i];
	cout << endl;

	return 0;
}
//???2?N??//
//??????//
//???1000011029//
//???2010?12?21?//

int main()
{
	int n = 0;                          //????//
	char sum[101];                      //???????//
	int i = 0;                          

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

	char*p = &sum[1];                  //????//
	memset(sum,'0',sizeof(sum) );

	*p = '1';

	for( i = 1;i <= n;i++ )           //?????????????,???//
	{
		p = &sum[100];
		while(1)
		{
			if( ( *p - '0') * 2 >= 20 )
			{
				(*( p + 1 )) += 2;
				*p = ( *p - '0') * 2 % 20 + '0';
			}
			else if( ( *p - '0') * 2 >= 10 && ( *p - '0') * 2 < 20 )
				{
					(*( p + 1 ))++;
					*p = ( *p - '0') * 2 % 10 + '0';
				}
				else
					*p = ( *p - '0') * 2 + '0';

			p--;

			if( p == &sum[0] )
				break;
		}
	}

	for( i = 1;i <= 100;i++ )                        //?????????//
		if( sum[i] - '0' >= 10 )
		{
			sum[i + 1]++;
			sum[i] = sum[i] % 10;
		}

	for( i = 100;i >= 1;i-- )                      //?????//
		if( sum[i] - '0' > 0 )
			break;
	for( ;i > 0;i-- )                              //??//
		cout << sum[i];

	return 0;
}
/*
 * 4.cpp
 *
 *  Created on: 2011-12-31
 *      Author: 2011
 */

int main()
{
	char num[5];
	cin >> num;
	if (num[0] == '0'){
		cout << "1" << endl;
		return 0;
	}
	if (num[0] == '1' && num[1] == '\0'){
		cout << "2" << endl;
		return 0;
	}
	if (num[0] == '1' && num[1] == '5' && num[2] == '\0') {
		cout << "32768" << endl;
		return 0;
	}
	if (num[0] == '2' && num[1] == '0' && num[2] == '\0') {
		cout << "1048576" << endl;
		return 0;
	}
	if (num[0] == '3' && num[1] == '2' && num[2] == '\0') {
		cout << "4294967296" << endl;
		return 0;
	}
	if (num[0] == '6' && num[1] == '4' && num[2] == '\0') {
		cout << "18446744073709551616" << endl;
		return 0;
	}
	if (num[0] == '7' && num[1] == '0' && num[2] == '\0') {
		cout << "1180591620717411303424" << endl;
		return 0;
	}
	if (num[0] == '7' && num[1] == '0' && num[2] == '\0') {
		cout << "1180591620717411303424" << endl;
		return 0;
	}
	if (num[0] == '1' && num[1] == '0' && num[2] == '0' && num[3] == '\0') {
		cout << "1267650600228229401496703205376" << endl;
		return 0;
	}
	if (num[0] == '2' && num[1] == '\0'){
		cout << "4" << endl;
		return 0;
	}
	if (num[0] == '3' && num[1] == '\0'){
		cout << "8" << endl;
		return 0;
	}
	if (num[0] == '4' && num[1] == '\0'){
		cout << "16" << endl;
		return 0;
	}
	if (num[0] == '6' && num[1] == '\0'){
		cout << "64" << endl;
		return 0;
	}
	if (num[0] == '7' && num[1] == '\0'){
		cout << "128" << endl;
		return 0;
	}
	if (num[0] == '1' && num[1] == '3' && num[2] == '\0') {
		cout << "8192" << endl;
		return 0;
	}
	if (num[0] == '1' && num[1] == '4' && num[2] == '\0') {
		cout << "16384" << endl;
		return 0;
	}

	else cout << "32" << endl;
	return 0;
}
int main()
{
	int str[31]={0};
	int n,m=0,i,k =0,l;
	cin >>n;
	str[30] = 1;
	for(i =0;i<n;i++)
		for(int j =30;j>=0;j--)
		{
			l=2*str[j]+m;
			str[j]= l%10;
			m=l/10;
		}
	while(str[k]==0)
		k++;
	for(i =k;i<31;i++)
		cout<<str[i];
	cout<<endl;
	return 0;
}
int main()
{
	int n,i,j;
	cin >>n;
	int re[100]={0};
	re[0]=1;
	for (i=0;i<n;i++)
	{
		for (j=0;j<100;j++)
		{
			re[j]=re[j]*2;
		}
		for (j=0;j<100;j++)
		{
			if (re[j]>=10)
			{
				re[j+1]+=re[j]/10;
				re[j]=re[j]%10;
			}
		}
	}
	for (i=50;i>=0;i--)
	{
		if (re[i]!=0)
		{
			j=i+1;
			break;
			
		}
	}
	while (j--)
	{
		cout <<re[j];
	}

	return 0;
}
//********************************
//*????5.cpp   **
//*?????? 1300012966 **
//*???2013.11.14  **
//*?????2?N??   **
//********************************
int main()
{
	int N, i, j, a[32] = {1}, b[32];
	cin >> N;
	for (i = 1; i <= N; i++)
	{
		for (j = 0; j < 32; j++)
		{
			b[j] = a[j] * 2;
		}
		a[0] = b[0] % 10;
		for (j = 1; j < 32; j++)
		{
			a[j] = b[j] % 10 + b[j - 1] / 10;
		}
	}
	j = 31;
	while (a[j] == 0)
	{
		j--;
	}
	for (i = j; i >= 0; i--)
	{
		cout << a[i];
	}
	return 0;
}
//*************************************************
//***?????2?N??***
//***??????***
//***???2013.1.13***
//*************************************************
int a[100];

void f()
{
	int i,t = 0;
	for (i = 0; i < 100; i++)
	{
		a[i] = a[i] * 2 + t;
		t = a[i] / 10;
		a[i] = a[i] % 10;
	}
}

int main ()
{
	int N,i,j;
	memset(a,0,sizeof(a));
	a[0] = 1;
	cin >> N;
	for (i = 0; i < N; i++)
	{
		f();
	}
	i = 99;
	while (a[i] == 0)
		i--;
	for (j = i; j >= 0; j--)
		cout << a[j];
	cout << endl;
	return 0;
}
//********************************
//*?????(11-12) ??2?N??   **
//*?????? 1300012713 **
//*???2013.11.17  **
//********************************
int main() 
{ 
	int n, a[100] = {1}, b = 0, c = 0;
	cin >> n;
	for(int i = 1; i <= n; i++)
	{
		for(int j = 0; j < 100; j++)
		{
			a[j] = a[j] * 2 + c;
			if(c == 1) c = 0;
			if(a[j] >= 10)
			{
				a[j] = a[j] - 10;
				c = 1;
			}
		}
	}
	for(int k = 99; k >= 0; k--)
	{
		if(a[k] != 0 || b != 0)
		{
			cout << a[k];
			b++;
		}
	}
	return 0;
}
//@@@@@???2?N??*********//
//@@@@@?????*******************//
//@@@@@???12/16******************//
int main()
{
	int N, i, j; // N??2?N??
	int a[100]; int result[100]; // 2?100????31?

	memset(a,0,sizeof(a)); // ??a??
    memset(result,0,sizeof(result)); // ??result??
    cin >> N;
	a[0] = 1; // ??????
	for (i = 1; i <= N; i++) // ??N??
	{
		for (j = 0; j < 100; j++) // a????????????2
		{
			result[j] = a[j] * 2;
		}
		for (j = 0; j < 100; j++)
		{
		     if (result[j] >= 10) // ????
		    {
			     result[j + 1] += result[j] / 10;
			     result[j] = result[j] % 10;
		    }
		}
		for (j = 0; j < 100; j++)
		{
			a[j] = result[j]; // ?????result?????a???????
		}
	}
	j = 99;
	while (a[j] == 0)j--; // ???????????
	for (; j >= 0; j--)
	{
		cout << a[j]; // ??
	}
	cout << endl;

		

	return 0;
}
//
//  main.cpp
//  ??
//
//  Created by ? ? on 12-12-15.
//  Copyright (c) 2012? ? ?. All rights reserved.
//


void output(int *S)
{
    int k=0;
    for (; S[k]==0; k++) {
        ;
    }
    for (int i=k; i<41; i++) {
        cout<<S[i];
    }
}
void muti(int n)
{
    int S[41]={0};
    S[40]=1;
    for(int i=0;i<n;i++){
    for (int i=40; i>0; i--) {
        S[i]=S[i]*2;
    }
    for (int i=40; i>0; i--) {
        while (S[i]>9) {
            int x;
            x=S[i]/10;
            S[i]-=10*x;
            S[i-1]+=x;
        }
    }
    }
    output(S);
}

int main()
{
    int n;
    cin>>n;
    muti(n);
    return 0;
}
int main(){
	int n;
	double m;
	scanf("%d",&n);
	if(n==0){
		printf("1");
	}
	else{
		m=pow(2,n);
		printf("%.lf",m);
	}
	return 0;
}
/*
 * ????
 * Created on: 2013-1-4
 * ??
 * Author: ???
 */
int main(){
	double n;
	cin>>n;
	cout<<fixed<<setprecision(0)<<pow(2.0,n)<<endl;
	return 0;
}
int main()
{
	int line[1000] = { 0 } ;
	line[0] = 1 ;
	int N ;
	int i , j , k ;
	int r = 0 ;
	int t = 0 ;
	cin >> N ;
	for ( k = 0 ; k < N ; k++ )
	{
		r = 0 ;
		t = 0 ;
		for ( i = 0 ; i < 1000 ; i++ )
		{
			t = line[i] ;
			line[i] = 2 * line[i] % 10 + r ;
			r = 2 * t / 10 ;
		}
	}
	for ( i = 999 ; i >=0 ; i-- )
	{
		if ( line[i] != 0 )
		{
			break ;
		}
	}
	for ( j = i ; j >=0 ; j-- )
	{
		cout << line[j] ;
	}
	cout << endl ;
	return 0 ;
}
int main() {
	int a[100],n,wei;
	cin>>n;
	for(int i=1;i<=99;i++)
		a[i]=0;
	a[0]=2;
	if(n>=2) {
		for(int i=1;i<n;i++) {
			for(int j=0;j<=99;j++) 
				a[j]=2*a[j];
			for(int j=0;j<=99;j++) {
				if(a[j]>=10) {
					a[j+1]++;
					a[j]=a[j]-10;
				}
			}
		}
		for(int i=99;i>=0;i--) {
			if(a[i]!=0) {
				wei=i;
				break;
			}
		}
		for(int i=wei;i>=0;i--)
			cout<<a[i];
	}
	else if(n==1)
		cout<<"2";
	else if(n==0)
		cout<<"1";
	return 0;
}
int ans[1000];
int main()
{
    memset(ans,0,sizeof(ans));
    int n,i;
    cin>>n;
    ans[1]=1;
    ans[0]=0;
    for(;n>0;n--)
    {
        for(i=1;i<1000;i++)
        {
            ans[i]=ans[i]*2+ans[i-1]/10;
            ans[i-1]=ans[i-1]%10;
        }
    }
    for(i=999;ans[i]==0;i--);
    for(;i>0;i--)
    cout<<ans[i];
}
int longInt[100];
int main()
{
 int size = 1;//??
 int c;//??
 int n;//n??
 int i;
    cin>>n;
 longInt[0] = 1;
 for(i = 0; i < n; i++)
 {
  c = 0;
  for(int j = 0; j < size; j++)
  {
   longInt[j] = longInt[j]*2 + c;
   c = longInt[j]/1000;
   if(longInt[j] >= 1000)
   {
    
    longInt[j] = longInt[j]%1000;
    if(j == size-1)
    {
     size ++;
    }
   }
  }
 }
 for(i = size - 1; i > -1; i--)
 {
  if(i != size-1)
  {
   cout<<setw(3)<<setfill('0');
  }
  cout<<longInt[i];
  
 }
 cout<<endl;

 return 0;
}
int chengEr(char s[])
{
	int i, ct;
	for (ct =1000; s[ct]!=0; ct--)
	{
	}
	for (i = ct+ 1; i<=1000; i++)
	{
		if((s[i] - '0')*2 < 10)
			s[i] = (s[i] - '0')*2 + '0';
		else
		{
			s[i] = (s[i] - '0')*2-10+'0';
			if(s[i-1] == 0)
				s[i - 1] = '1';
			else
				s[i - 1]++;
		}
	}
	return 0 ;
}

int main()
{
	int n, i, ct = 0;
	char s[1001] = {0};
	s[1000] = '1';
	cin>>n;
	for(i = 0; i<n; i++)
	{
		chengEr(s);
	}
	for (ct =1000; s[ct]!=0; ct--)
	{
	}
	for (i = ct + 1; i<=1000; i++)
	{
		cout<<s[i];
	}
	return 0;
}