semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//*****************************
//*?????? 1300012809   **
//*???2013.11.16          **
//*?????2?N??        **
//*****************************
int main()
{
	int n, i, j, changdu;
	changdu = 1;
	int a[1005] = {0}, jieguo[1005] = {0};
	cin >> n;
	for (i = 0; i <= n; i++)
	{
		if (i == 0) a[0] = 1;
		if (i == 1) a[0] = 2;
		if (i != 0 && i != 1)
		{
			if (a[changdu-1] >= 5 ) changdu += 1;
			for (j = 0; j < changdu; j++)
			{
				a[j] = a[j]*2;
			}
			for (j = 0; j < changdu; j++)
			{
				a[j+1] = a[j] / 10 + a[j+1];
				a[j] = a[j] % 10 ;
			}

		}
	}
	for (j = changdu-1; j >= 0; j--) cout << a[j];
	cout << endl;

	

	return 0;
}
int main()
{
int n;
cin>>n;
int i=0,j=0;;
int a[100]={0};
a[1]=1;
for(i=1;i<=n;i++)
{
	for(j=1;j<100;j++)
		a[j]=a[j]*2;
	for(j=1;j<100;j++)
		if(a[j]>=10)
		{
			a[j+1]=a[j+1]+a[j]/10;
			a[j]=a[j]%10;
		}
}
for(i=99;i>1;i--)
if(a[i]!=0)break;
for(;i>=1;i--)
cout<<a[i];
cout<<endl;
return 0;
}
char p[200]={'1'},temp[200]={0}; //???????? 

void sq()  //????2 
{int i,j,jinwei=0;
 for(i=0;p[i]!='\0';i++)
   {temp[i]=((p[i]-'0')*2+jinwei)%10+'0'; //??? 
    jinwei=((p[i]-'0')*2+jinwei)/10;      //?? 
    }
 temp[i]=jinwei+'0'; //??? 
 for(i=0;i<200;i++) {p[i]=temp[i];temp[i]=0;} //??????? 
 }


int main() 
{int i,j,n;
 cin>>n;
 for(i=0;i<n;i++)  sq();
 for(i=199;p[i]=='\0'||p[i]=='0';i--); //??????????????? 
 for(;i>=0;i--) cout<<p[i];

 return 0; 
 }
int main()
{
	int n, temp = 0;
	int power[32] = {0,1};
	cin >> n;
	for(int i = 1; i <= n; i++)
	{
		for(int j = 1; j < 32; j++)
		{
			power[j] *= 2;
			power[j] += temp;
			if(power[j] >= 10)
			{
				power[j] -= 10;
				temp = 1;
			}
			else
				temp = 0;
		}
	}
	int i = 31;
	while(power[i] == 0)
		i--;
	for(int j = i; j >= 1; j--)
		cout << power[j];
	cout << endl;
	return 0;
}
/**
 * ??????
 * ???1000012844
 * ?????2?N??
 **/



void multiply( char str[], int n );

int main()
{
	int N;
	char str[ 200 ] = "1";

	cin >> N;

	while ( N > 0 )
	{
		multiply( str, 2 );
		N--;
	}
		
	cout << str << endl;

	return 0;
}

void multiply( char str[], int n )
{
	int num[ 200 ];
	int jump = 0, temp;
	memset( num, 0, sizeof( num ) );
	char *sPtr = str + strlen( str ) - 1;
	int *nPtr = num + 199;
	
	while( sPtr != str - 1 )
	{
		*nPtr-- = *( sPtr-- ) - '0';
	}

	nPtr = num + 199;

	while ( nPtr != num - 1 )
	{
		temp = *nPtr * n % 10 + jump;
		jump = *nPtr * n / 10;
		*nPtr-- = temp;
	}

	nPtr = num;
	sPtr = str;
	while ( *nPtr == 0 )
	{
		nPtr++;
	}

	while ( nPtr != num + 200 )
	{
		*sPtr++ = *nPtr++ + '0';
	}

	*sPtr = 0;
}
int main()
{
double n,a;
scanf("%lf",&n);
a=pow(2.0,n);
printf("%.0lf",a);
return 0;
}
int main()
{
	int N, i, j, l=1,a[32]={0};
	cin >> N;
	a[31]=1;
	for(i=1; i <= N; i++)
	{
		for(j=32-l; j <= 31; j++)
		{
			a[j] *= 2;
		}
		for(j=31; j >= 32-l; j--)
		{
			if(a[j] >= 10)
			{
				a[j-1] += a[j]/10;
				a[j]=a[j]%10;
			}
		}
		j=0;
		while(a[j] == 0)
			j++;
		l=32-j;
	}
	i=0;
	while(a[i] == 0)
	{
		i++;
	}
	for( ; i<32; i++)
	{
		cout << a[i];
	}
	return 0;
}
int main()
{
	int N;
	cin >> N;
	int num[101] = {0}, carry_in[101] = {0};
	int i, j, k;
	num[100] = 1;
	for(i = 1; i <= N; i++)
	{
		for(j = 100; j >= 1; j--)
		{
			carry_in[j] = (2 * num[j]) / 10;
			num[j] = (2 * num[j]) % 10;
		}
		for(k = 99; k >= 1; k--)
			num[k] = num[k] + carry_in[k + 1];
	}
	for(i = 1; i <= 100; i++)
	{
		if(num[i] != 0)
		{
			j = i;
			break;
		}
	}
	for(j = i; j <= 100; j++)
		cout << num[j];
	cout << endl;
	return 0;
}
/**
* @file 1000010424_2.cpp
* @author ???
* @date 2010?12?17
* @description
* ??????: ??2?N??
*/



int main()
{
	int power, output[34] = {1},								//??????????
		i, j,													//?????
		numEnd;													//???????

	cin >> power;												//?????

	for(i = 1; i <= power; i++)									//????2????
	{
		for(j = 0; j < 34; j++)
			output[j] *= 2;										//??2?

		for(j = 0; j < 34; j++)
			if(output[j] >= 10)									//???
			{
				output[j] -= 10;
				output[j + 1]++;
			}
	}

	for(numEnd = 33; numEnd > 0; numEnd--)
		if(output[numEnd] == 0)									//??????
			;
		else
			break;												//?????????

	//???
	for(i = numEnd; i >= 0; i--)
		cout << output[i];
	cout << endl;

	return 0;
}
int n,out[50]={0},mark=0;
int count(int a)
{
	int i;
   if(a==n)
   {
	   for(i=49;i>=0;i--)
	   {
		
		   if(out[i]!=0)
		   {
			   mark=1;
		   }
		   if(mark==1)
			   cout<<out[i];
	   }
	   return 0;
   }
   else
   {
	   for(i=0;i<50;i++)
	   {
		   out[i]=out[i]*2;
		  
	   }
	   for(i=0;i<50;i++)
	   {
       	if(out[i]>=10)
		{
			  out[i+1]+=out[i]/10;
		      out[i]=out[i]%10;
		 }
	   }
	   count(a+1);
   }
   return 0;
}
	   

int main()
{
	cin>>n;
	out[0]=1;
	count(0);
		return 0;
}
int main(){
	int n,i;
	double s;
	scanf("%d",&n);
	if(n==0){
		s=1;
		printf("%.0lf",s);
	}
	if(n==1){
		s=2;
			printf("%.0lf",s);
	
	}
	if(n>=2){
		s=1;
		i=1;
		while(i<=n){
			s=2*s;
			i++;
		}
		printf("%.0lf",s);
	}
	
	return 0;
}
//?????????//
char cnum[100];
int inum[100];
int cal();
int main ()
{
	memset(cnum, '0', sizeof(cnum));
	memset(inum, 0, sizeof(inum));
	cnum[0] = '1';
	int len;
	int n;
	cin >> n;
	if (n == 0)
	{
		cout << "1" << endl;
		return 1;
	}
	for (int i = 1; i <= n; i++)
	{
		len = cal();
	}
	for (int i = len; i >= 0; i--)
		cout << cnum[i];
	cout << endl;
	return 0;
}
int cal()
{
	int i;
	for (i = 0; i < 100; i++)
		inum[i] = cnum[i] - '0';
	for (i = 0; i < 100; i++)
		inum[i] *= 2;
	for (i = 0; i < 100; i++)
	{
		if (inum[i] >= 10)
		{
			inum[i] -= 10;
			inum[i + 1]++;
		}
	}
	for (i = 0; i < 100; i++)
		cnum[i] = inum[i] + '0';
	for (i = 99; i >= 0; i--)
		if (inum[i] != 0)
			break;
	return i;
}
int main()
{
	int s[1000];
	int N,i,j,count=0;
	for(i=0;i<1000;i++)
		s[i]=-1;
	s[0]=1;
	cin>>N;
	if(N==0)
	{
		cout<<"1"<<endl;
		return 0;
	}
	else
	{
		do
		{
			for(i=0;s[i]!=(-1);i++)
				s[i]=s[i]*2;
			i=0;
			do
			{
				if(s[i]>9)
				{
					s[i]-=10;
					if(s[i+1]==(-1))
					{
						s[i+1]=1;
					}
					else
						s[i+1]+=1;
				}
				i++;
			}
			while(s[i]!=(-1));
			count++;
		}
		while(count<N);
		for(i=0;;i++)
		{
			if(s[i]==(-1))
			{
				for(j=i-1;j>=0;j--)
					cout<<s[j];
				cout<<endl;
				break;
			}
		}
	}
	return 0;
}
int main(){
	int n,i;
	double f;
	scanf("%d",&n);
	f=pow(2.0,(double)n);
	printf("%.0lf",f);
	return 0;
}
//************************************************
//*????????N??                         *
//*?  ?????                                *
//*?  ??1000012806                            *
//*?????2010.12.17                          *
//************************************************
int main()
{
	int N, i, j, flag = 0;                       //i,j,??????flag???
	cin>>N;
	int a[100] = {0};                            //???????
	a[99] = 1;                                   //????????
	for (j = 1; j <= N; j++)
	{
		for (i = 99; i >= 0; i--)                //?????????
		{

			if (a[i] * 2 >= 10)                  //????????flag???
			{
				a[i] = a[i] * 2 + flag - 10;
				flag =  1;
			}
			else                                 //????flag???
			{
				a[i] = a[i] * 2 + flag;
				flag = 0;
			}
		}
	}
	for (i = 0; i <= 99; i++)
	{
		if (a[i] != 0)                           //???????????
		{
			j = i;
			break;
		}
	}
	for (i = j; i <= 99; i++)                    //??????????????
	{
		cout<<a[i];
	}
	return 0;
}
/* title:  */
/* author: ??? */
/* time: 2011.12.31*/



int main()
{
	int n; 
	cin >> n;
	int a[101] = {0};
	int b[101] = {0};
	int i, j;
	a[100] = 1;
	for(i = 0; i < n; i++)
	{
		for(j = 100;  j > 0; j--)
		{
			a[j] = 2 * a[j] + b[j];
			if(a[j] >= 10)
			{
				a[j] = a[j] - 10;
				b[j - 1] = b[j - 1] + 1;
			}
		}
		for(j = 0; j <= 100; j++)
			b[j] = 0;
	}
	i = 0;
	while(a[i] == 0)
		i++;
	for(j = i; j <= 100; j++)
		cout << a[j];
	cout << endl;
	return 0;
}
int n,i,j,k=1;
int a[35]={0},b[35];
void multiple()	//????????2???
{
	if(n==0) cout<<"1"<<endl;
	else
	{
		if(k==n)
		{
			for(i=34;i>=0;i--)
				if(a[i]!=0) break;
			for(j=i;j>=0;j--)
				cout<<a[j];		//?????????
		}
		else
		{
			b[0]=(a[0]*2)%10;
			for(i=1;i<35;i++)
				b[i]=(a[i]*2)%10+a[i-1]*2/10;	//???+??
			for(i=0;i<35;i++)
				a[i]=b[i];
			k++;
			multiple();
		}
	}
}

int main()
{
	cin>>n;
	a[0]=2;
	multiple();
	return 0;
}
int main()
{
	int n;
	cin >> n;
	char c[50];
	c[49] = '1';
	for(int i =0 ;i<49;i++)
		c[i] = '0';
	for(int i = 0;i<n;i++)
	{
		int t = 0;
		for(int j = 49;j>0;j--)
		{
			c[j] += c[j]+t-'0';
			if( c[j] > '9')
			{
				c[j] -= 10;
				t = 1;
			}
			else
				t =0;
		}
	}
	int i = 0;
	while(c[i] <='0')
		i ++;
	for(int j = i; j < 50;j++)
		cout<<c[j];
	cout<<endl;
	return 0;
}
//**********************
//*?????2?N??
//*?????? 1300012850
//*???2013/11/19
//***********************
int main()
{
	int a[10000], n, sum = 1, i, k;
	cin >> n;
	for(int 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] *= 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--)
		cout << a[i];
	cout << endl;
	return 0;
}
int a[1010] = {0};

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

int main()
{
	int n;
	cin >> n;
	a[1] = 1;
	f(n);
	return 0;
}
int main()
{
	int n,i,temp = 0,t;
	int c[100] = {0};
	cin >> n;
	c[0] = 2;
	c[1] = -1;
	for(i = 1;i <= n - 1;i++)
	{
		int j = 0;
		temp = 0;
		while(c[j] != -1)
		{
			t = c[j] * 2 + temp;
			c[j] = t % 10;
			temp = t / 10;
			j++;
		}
		if(temp != 0)
			c[j++] = temp;
		c[j] = -1;
	}
	i = 0;
	while(c[i] != -1)
		i++;
	if(n != 0)
	{
		for(int j = i - 1;j >= 0;j--)
			cout << c[j];
	}else
		cout << 1;
	return 0;
}
//
//  main.cpp
//  ??2?N??
//
//  Created by ? ?? on 12-12-10.
//  Copyright (c) 2012? ? ??. All rights reserved.
//

int n, sum = 5;
char a[999999999];
char b[999999999];
int p = 0;
int l = 2;

void cheng(int m)
{
    p = 0;
    int i;
    for (i = l; i >= 1; i--)
    {
        b[i] = ((a[i - 1] - '0') * 2 % 10 + p) % 10 + '0';
        p = ((a[i - 1] - '0') * 2 + p) / 10;
    }
    b[0] = p + '0';
    if (b[0] != '0') l++;
    if (b[0] == '0')
        for (i = 0; i < l; i++)
            b[i] = b[i + 1];
    strcpy(a, b);
    if (sum < n)
        cheng(sum++);
}
int main()
{
    cin >> n;
    if (n == 0) cout << 1;
    if (n == 1) cout << 2;
    if (n == 2) cout << 4;
    if (n == 3) cout << 8;
    if (n == 4) cout << 16;
    a[0] = '1';a[1] = '6';
    if (n > 4)
    {
        cheng(sum);
        for (int i = 0; i < l; i++) cout << a[i];
    }
    return 0;
}
int main(){
	int n,i,j,k=0,t;
	int sum[100]={0};
	sum[99]=1;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		for(j=99;j>=0;j--)
		{
		t=sum[j]*2+k;
		if(t<10)
			{
			sum[j]=t;
			k=0;
			}
		else
			{
			sum[j]=t-10;
			k=1;
			}
		}
	}
	for(i=0;sum[i]==0;i++)
		;
	for(j=i;j<=99;j++)
		cout<<sum[j];
	cout<<endl;
	return 0;
}
int ans[100]={0};
void multi(int a[])
{
	int i,l,aa[100]={0};
	for (i=99;i>=0;i--) if (a[i]!=0)
	{
		l=i+1;
		break;
	}
	for (i=0;i<l;i++)
	{
		aa[i]+=a[i]*2;
		aa[i+1]+=aa[i]/10;
		aa[i]=aa[i]%10;
	}
	for (i=0;i<100;i++) ans[i]=aa[i];
}
int main()
{
	int n,i,l;
	cin>>n;
	ans[0]=1;
	for (i=0;i<n;i++)
		multi(ans);
	for (i=99;i>=0;i--) if (ans[i]!=0)
	{
		l=i+1;
		break;
	}
	for (i=l-1;i>=0;i--) cout<<ans[i];
	cout<<endl;
	return 0;
}
int main()
{
  int n;
  cin >> n;
  int i,ans=1,j,k=1;
  int a[100]={0};
  if(n==0)
  {
    cout << 1 << endl;
  }
  else
  {
     a[0]=1;
     int t=0;
     while(t<n)
     {
       t++;
       for(i=0;i<100;i++)
       {
         a[i]=a[i]*2;
         
       }
       for(i=0;i<100;i++)
       {
         if(a[i]>=10)
         {
           
           
           a[i+1]=a[i+1]+(a[i]/10);
           a[i]=a[i]%10;
           
         }
       }
     }
     
      j=99;
      while(a[j]==0)
      {
        j--;
      }                                   
     for(;j>=0;j--)
     {
       cout << a[j];
     }
     cout << endl;
  }
  cin.get();cin.get();cin.get();
  return 0;
}
int main()
{
	char a[101];
	int b[101];
	memset(a, '0', sizeof(a));
	memset(b, 0, sizeof(b));
	int n, i, j;
	cin >> n;
    if (n == 0)
		a[100] = '1';
	else
	{
		a[100] = '1';
		for (i = 1; i <= n; i++)
		{
			for (j = 100; j >= 0; j--)
			{
				a[j] = (a[j] - '0') * 2 + '0' + b[j];
				if ((a[j] - '0') >= 10)
				{
					a[j] -= 10;
					b[j - 1] = 1;
				}
			}
			memset(b, 0, sizeof(b));
		}
	}
	for (i = 0; i <= 100; i++)
	{
		if (a[i] != '0')
		{
			for (j = i; j <= 100; j++)
				cout << a[j];
			cout << endl;
			break;
		}
	}
	return 0;
}
int main()
{
  int ans[10000]={0};
  int mid[10000]={0};
  int n,i,temp,j;
  cin>>n;
  mid[1]=1;mid[0]=1;
  if (n==0) {ans[1]=1;ans[0]=1;}
  if (n>=1)
  {for (j=1;j<=n;j++)
    {
      for (i=1;i<=ans[0];i++)
        ans[i]=0;
      for (i=1;i<=mid[0];i++)
        {
          temp=mid[i]*2;
          ans[i]=ans[i]+temp % 10;
          ans[i+1]=temp / 10;                    
        }
      ans[0]=mid[0];
      if (ans[mid[0]+1]>0) ans[0]=mid[0]+1;
      mid[0]=ans[0];
      for (i=1;i<=ans[0];i++)
         mid[i]=ans[i];          
  }}    
  for (i=ans[0];i>=1;i--)
    cout<<ans[i];
  
  return 0;
}
char result[33] = {0};

void Multiply()
{
	int i = 0, up = 0;
	int len = strlen(result);
	for (i = 0; i < len; i++)
	{
		int temp = result[i] - '0';
		temp *= 2;
		result[i] = temp % 10 + up + '0';
		up = temp / 10;
		if (i == len - 1 && up != 0)
			result[i + 1] = up + '0';
	}
}

int main()
{
	int n;
	result[0] = '1';
	cin >> n;
	int i;
	if (n == 0)
		cout << result << endl;
	else
	{
		for (i = 1; i <= n; i++)
			Multiply();
		for (i = strlen(result) - 1; i >= 0; i--)
			cout << result[i];
	}
	return 0;
}
int main()
{
    int j,i,n,mul[1000]={0},add[1000]={0};
    cin>>n;
    mul[0]=1;
    for(i=0;i<n;i++)
    {
        for(j=0;j<999;j++)
        {
            add[j+1]=0;
            mul[j]=mul[j]*2;
            if(mul[j]>=10)
            { add[j+1]=mul[j]/10;
              mul[j]=mul[j]%10;
            }

        }
        for(j=0;j<999;j++)
        {
            mul[j]=mul[j]+add[j];
        }
    }
    i=999;
    while(mul[i]==0) i--;
    for(;i>=0;i--)
    {
        cout<<mul[i];
    }
    return 0;
}
const int MAX_DIGIT = 10000;

int main()
{
    int num[100];
    num[0] = 1;
    num[1] = 0;
    int numDigits = 1;
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i)
    {
        int end = numDigits;
        for (int i = 0; i < end; ++i)
        {
            num[i] *= 2;
        }
        for (int i = 0; i < end; ++i)
        {
            if (num[i] >= MAX_DIGIT)
            {
                if (i != numDigits - 1)
                    num[i+1] += num[i] / MAX_DIGIT;
                else
                {
                    num[numDigits] = num[i] / MAX_DIGIT;
                    ++numDigits;
                }
            }
            num[i] = num[i] % MAX_DIGIT;
        }
    }
    for (int i = numDigits - 1; i >= 0; --i)
    {
        if (i != numDigits - 1)
            cout << setfill('0') << setw(4);
       cout << num[i];
    }
    cout << endl;
}
//********************************
//*?????2?N??  **
//*?????? 1300012946 **
//*???2013.11.15  **
//********************************
int main()
{
	int n,i,j,a[32]={1};
	cin>>n;
	for (i=0 ; i<n ; i++)
	{
		for (j=0 ; j<32 ; j++)
		{
			a[j] = 2 * a[j];
		}
		for (j=0 ; j<32 ; j++)
		{
			if (a[j]>9)
			{
				a[j] -= 10;
				a[j+1]++;
			}
		}
	}
	j=31;
	while (a[j]==0)
		j--;
	for ( ; j>=0 ; j--)
	{
		cout<<a[j];
	}
	return 0;
}
int main()
{
	char c[1000];
    int m,i,j,a[1000],k;
	cin>>m;
	a[0]=2;
	if(m!=0)
	{
	for(i=1;i<1000;i++)
	{
		a[i]=0;
	}
	for(i=0;i<m-1;i++)
	{
        for(j=0;j<=1000;j++)
		{
			a[j]=a[j]*2;
		}
		for(j=0;j<1000;j++)
		{
			if(a[j]>9)
			{
				a[j]=a[j]%10;
				a[j+1]++;
			}
		}
	}
	i=999;
	while(a[i]==0)i--;
	for(k=i;k>=0;k--)
	{
		cout<<a[k];
	}
	cout<<endl;
	}
	else cout<<"1"<<endl;
	return 0;
}
int main()
{
	int a[50] = {0};
	int n, i, j, carry, temp;
	cin >> n;
	a[0] = 1;
	for (i = 1;i <= n;i++)
	{
		carry = 0;
		for (j = 0;j < 49;j++)
		{
			temp = floor(a[j] * 2 / 10);
			a[j] = (a[j] * 2) % 10;
			a[j] += carry;
			carry = temp;
		}
	}
	temp = 0;
	for (i = 0;i < 49;i++)
		if (a[i] != 0)
			temp = i;
	for (j = temp;j >= 0;j--)
		cout << a[j];
	cout << endl;
	return 0;
}
/*?????????????N(N<=100)???2?N?????
 *????: 2012-12-10
 *??: ??
 */
int main() {
	int N, i, j, res[40] = { 1 }, len = 1;
	cin >> N;
	for (i = 0; i < N; i++) {
		for (j = 0; j < len; j++) {
			res[j] = res[j] * 2 + res[len];
			if (res[j] > 9) {
				res[j] -= 10;
				res[len] = 1;
			}
			else
				res[len] = 0;
		}
		if (res[len])
			len++;
	}
	for (i = len - 1; i >= 0; i--)
		cout << res[i];
	return 0;
}
// *********************************
// ****  file ??2?N??.cpp  ****
// ****  ID:1000012895          ****
// ****  Author ???          ****
// ****  2010/12/15             ****
// *********************************
int main()
{
	int i, j, n, num[40], *p = NULL;    // num???????????????num[0]????????
	memset(num,0,160);                  // ??num???
	num[0] = 1;                         // ????????????00001?????
	cin >> n;
	for(i = 0; i < n; i++)
	{
		for(j = 0; j < 40; j++)         // ??????
			num[j] *= 2;
		for(j = 0; j < 40; j++)         // ????
		{
			
			if(num[j] > 9)
			{
				num[j+1]++;
				num[j] -= 10;
			}
		}
	}
	p = num + 38;                         // ????????
	while(*(--p) == 0);                   // ???????????????
	while(p >= num)                       // ????????????????
	{
		cout << *p;
		p--;
	}
	cout << endl;
	return 0;
}
//
//  main.cpp
//  final
//
//  Created by blues cookie on 13-1-11.
//  Copyright (c) 2013? blues cookie. All rights reserved.
//

int a[100]={1};
int len=1;
void cal(int num)
{
	if(num==0)return;int carrybit=0;
	int i;
	for(i=0;i<len;i++)
	{
		a[i]=a[i]*2+carrybit;
		carrybit=a[i]/10;
		a[i]=a[i]%10;
	}
	if(carrybit==1)
	{
		len++;
		a[i]=1;
	}
	cal(num-1);
}
int main()
{
	int num;
	cin>>num;
	cal(num);
	for(int j=len-1;j>=0;j--)
	{
		cout<<a[j];
    }
}
int main(){
	int n,i,j,m,t;
	cin>>n;
	int a[1000]={0};
	a[0]=2;
	for(i=0,t=1;i<n-1;i++){
		for(j=0,m=0;j<t;j++){
			a[j]=a[j]+a[j]+m;
			if(a[j]>9){
				a[j]=a[j]-10;
				m=1;
				t++;
			}
			else m=0;
		}
	}
	for(i=99;i>0;i--)
		if(a[i]!=0)
			break;
	for(j=i;j>=0&&n!=0;j--)
		cout<<a[j];
	if(n==0)
		cout<<"1";
	cout<<endl;
	return 0;
}
/*			???????2?N?? 
			?????2010?12?17?
			???????
*/
int main()
{
	int num[100]={1} , i , j , len0 = 1 ,len1 , n ;
	cin >> n ;
	for (i = 0 ; i < n ; i++)
	{
		len1 = len0 ;
		if (num[len1 -1] >= 5)	len0++ ;
		for (j = len1 - 1 ; j >= 0 ; j--)
		{
			if (num[j] < 5)		num[j] = num[j] * 2 ;
			else 
			{
				num[j] = num[j] * 2 - 10 ;
				num[j + 1] ++ ;
			}
		}
	}
	for (i = len0 - 1 ; i >= 0 ; i--)
		cout << num[i] ;
	return 0 ;
}
int main()
{
	int i,n,temp=39,isum,ins,step=0;
	char sum[40];
	for(i=0;i<40;i++) sum[i]='0';
	sum[39]='1';
	cin >> n;
	if(n==0) {
		cout << '1' << endl;
		return 0;
	}
	else{
	while(n > 0){
		for(i=0;i<40;i++){
			if(sum[i]!='0') {
				temp=i;
				break;
			}}
		for(i=39;i>=temp-1;i--){
			isum=(int)sum[i]-48;
			ins=isum*2+step;
			if(ins < 10){
				sum[i]=(char)(ins+48);
				step=0;
			}
			else{
				sum[i]=(char)(ins+38);
				step=1;
			}}
		n--;
	}}
	for(i=0;i<39;i++){
		if(sum[i] != '0') {
			temp=i;
			break;
		}}
	for(i=temp;i<=39;i++) cout << sum[i];
	cout << endl;
	return 0;
}
//#include "stdafx.h"

int lena=0;
void cheng(int *a)
{
	for (int i=0;i<lena;i++)
	{
		a[i]=a[i]*2;
		
	}
	for (int i=0;i<lena;i++)
	{
		a[i+1]+=a[i]/10;
		a[i]=a[i]%10;
	}
	if (a[lena]>0) lena++;
	//cout<<lena;
}
int main()
//int _tmain(int argc, _TCHAR* argv[])
{
	int a[10000]={1};
	int n;
	lena=1;
	cin>>n;
	for (int i=0;i<n;i++)
		
	cheng(a);
	for (int i=lena-1;i>=0;i--)
		cout<<a[i];
	cout<<endl;
	
}
int main()
{
	int n, i, j, temp[100] = {0}, tag[100] = {0};
	cin >> n;
	temp[0] = 1;
	for (i = 0; i < n; i ++)
	{
		for (j = 0; j < 99; j ++)
		{
			if (temp[j] * 2 + tag[j] < 10)
			{
				temp[j] = temp[j] * 2 + tag[j];
				tag[j] = 0;
			}
			else
			{
				temp[j] = temp[j] * 2 + tag[j] - 10;
				tag[j] = 0;
				tag[j + 1] = 1;
			}
		}
	}
	for (i = 99; i >= 0; i --)
	{
		if (temp[i] != 0)
			break;
	}
	for (j = i; j >= 0; j --)
		cout << temp[j];
	cout << endl;
	return 0;
}
int main()
{
    int a[100] , n , h , j  , i ; 
    cin >> n ; 
    memset(a , 0 , sizeof(a)) ; 
    a[1] = 1 ; 
    h = 1 ; 
    for (i = 1 ; i <= n ; i ++ )
    {
        for (j = 1 ; j <= h ; j ++ )
            a[j] += a[j] ; 
        for (j = 1 ; j <= h ; j ++ )
            if (a[j] >= 10)
            {
                a[j] = a[j] - 10 ; 
                a[j + 1] += 1 ; 
            }
        if (a[h + 1] != 0)
            h ++ ; 
    }
    for (i = h ; i >= 1 ; i -- )
        cout << a[i] ; 
    cout << endl ; 
    return 0 ; 
}
int main()
{
    int n=0,s[100]={0},i=0,k=0;
      cin>>n;
      s[1]=1;
      for(k=1;k<=n;k++)
       {
           for(i=1;i<=80;i++)
             {
                s[i]=s[i]*2;                
             }              
           for(i=1;i<=79;i++)
             {
                 if(s[i]>=10)
                 {s[i+1]++;s[i]=s[i]%10;}                
             } 
       }
    for(i=80;i>=1;i--)
      {
         if(s[i]!=0)
         break;                
      }
    for(;i>=1;i--)
      cout<<s[i];
return 0;    
}
/**
 * @file 4.cpp
 * @author ??? 1300012960
 * @date 2013-11-01
 * @description
 * ??????: ???? */
int main()
{
	int n[31], m, flag;         // lg2 = 0.3010 ?????2^100?31? m???? flag????????0
	cin >> m;
	for (int i = 0; i < 30; i++) n[i] = 0;    // ????????0
	n[30] = 1;   // ???? 2^0 = 1
	for (int i = 0; i < m; i++)
	{
		for (int j = 30; j >= 0; j--)
		{
			n[j] *= 2;     // ????????????*2
		}
		for (int j = 30; j > 0; j--)
		{
			if (n[j] >= 10)
			{
				n[j - 1] += n[j] / 10;      // ??????????
				n[j] %= 10;
			}
		}
	}
	for (int i = 0; i < 31; i++)
	{
		if (n[i] > 0)
		{
			flag = i;      // ????????
			break;
		}
	}
	for (int i = flag; i < 31; i++) cout << n[i];   // ????
	return 0;
}
int main()
{
    char num[110];                        //??????????
    int N,i,j,s=1,temp,n=1,add[110];
    memset(num,'\0',sizeof(num));
    num[0]='1';
    cin>>N;
    for (i=0;i<N;i++)                     //??N?2??
    {
        memset(add,0,sizeof(add));
        for (j=0;j<n;j++)                 //???????2
        {
            temp=(num[j]-'0')*2;
            num[j]=temp%10+'0';
            if (temp>=10)
            {
                add[j+1]=1;
                if (num[j+1]=='\0')
                {
                    s++;
                    num[j+1]='1';
                }

            }
        }
        for (j=0;j<n;j++)                  //??
            num[j]+=add[j];
        n=s;
    }
    for (i=s-1;i>=0;i--)                   //??
    {
		temp=num[i]-'0';
        cout<<temp;
    }
    return 0;
}
int main()
{	
	int an[10011]={0};
	int temp[10011]={1};
	int i,j=0;
	int n=0;
	cin>>n;
	while(n>0)
	{
		for(i=0;i<10000;i++)
		{
			an[i]+=temp[i]*2;
			if(an[i]>=10)
			{
				an[i+1]+=1;
				an[i]=an[i]%10;
			}
		}
		for(i=0;i<10000;i++){
			temp[i]=an[i];
			//cout<<temp[1]<<temp[0]<<endl;
		}
		for(i=0;i<100;i++){
			//cout<<temp[i];
		}
		memset(an,0,sizeof(an));
		n--;
	}
	//cout<<temp[1]<<temp[0];
	for(i=10000;i>=0;i--)
	{	if(temp[i]!=0)
		{
			for(;i>=0;i--)
				cout<<temp[i];
			break;
		}
	}
	cout<<endl;
	return 0;
}
int main()
{
	int a[100];
	int i,n,k,j;
	cin>>n;
	for(i=0;i<100;i++)
		a[i]=0;
	    a[0]=1;
	for(k=1;k<=n;k++)
	{
		for(i=0;i<100;i++)
			a[i]=2*a[i];
		for(i=0;i<100;i++)
			if(a[i]>=10)
		    {
				a[i]=a[i]-10;
				a[i+1]++;
			}
	}
	for(i=99;i>=0;i--)
	{
		if(a[i]!=0)
		{
			j=i;
			break;
		}
	}
	for(i=j;i>=0;i--)
		cout<<a[i];
	return 0;
}