semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n , i , j; 
	int start;
	cin >> n;
	int num[101] = {0}; //??num????????
	num[100] = 1;
	for(i = 1; i <= n; i++)
	{
		for(j = 1; j <= 100; j++)//?????????2
		{
			num[j] = num[j] * 2;
		}
		for(j = 1; j <= 100; j++)//????10??????????-10
		{
			if(num[j] >= 10)
			{
				num[j] = num[j] - 10;
				num[j - 1]++; 
			}
		}
	}
	//????????? 
	for(i = 1; ; i++)
	{
		if(num[i] != 0)
		{
			start = i;
			break;
		}
	}
	// ???? 
	for(i = start; i <= 100; i++)
	cout << num[i];
	return 0;
}
void add(int []);
int main()
{
	int n, a[100] = {0}, i, j;
	a[0] = 1;
	cin >> n;
	for(i = 0; i < n; i++)
		add(a);
	i = 99;
	while(a[i] == 0)
		i--;
	for(j = i; j >= 0; j--)
		cout << a[j];
	cout << endl;
    return 0;
}
void add(int a[])
{
	int i = 99, j;
	while(a[i] != 0)
		i--;
	for(j = i; j >= 0; j--)
	{
		a[j] = 2 * a[j];
		if(a[j] >= 10)
		{
			a[j + 1]++;
			a[j] -= 10;
		}
	}
}
int main()
{
	int n,sum = 1, i, j, temp = 0, l;
	cin >> n;
	char str[40];
	for(i = 0; i < 40; i++)
	{
		str[i] = '0';
	}
	str[0] = '1';
	for(i = 1; i <= n; i++)
	{
		temp = 0;
		for(j = 0; j < 40; j++)
		{
			if(2 * (str[j] - '0') + temp >= 10)
			{
				str[j] = 2 * (str[j] - '0') - 10 + temp + '0';
				temp = 1;
			}
			else
			{
				str[j] = 2 * (str[j] - '0') + temp + '0';
				temp = 0;
			}
		}
	}
	for(i = 0; i < 40; i++)
	{
		if(str[i] == '0' && str[i + 1] == '0' && str[i + 2] == '0')
		{
			l = i;break;
		}
	}
	for(i = l - 1; i >= 0;i--)
	{
		cout << str[i];
	}
	return 0;
}
/* 
 * ????main.cpp
 * ??????
 * ?????2013-01-11
 * ????????????N(N<=100)???2?N?????
 */


void f ( int n )
{
	int i,j,l,len,c[10000] = {0};
	c[0] = 1;
	len = 1;
	for ( i = 0; i < n; i++ )
	{
		l = 0;
		for ( j = 0; j < len; j++ )
		{
			c[j] = c[j] * 2 + l;
			l = 0;
			if ( c[j] > 9 )
			{
				l = (c[j] - c[j] % 10) / 10;
				c[j] -= 10;
			}
		}
		if ( l > 0 )
		{
			c[j] += l;
			len += 1;
		}
	}
	for ( i = len - 1; i >= 0; i-- )
		cout << c[i];
	cout << endl;
}

int main ()
{
	int N;
	cin >> N;
	f(N);
	return 0;
}
int main()
{
	int n, a[32] = {1}, compute[32] = {0}, k;
	cin >> n;
	for(int i = 1; i <= n; i++)
	{
		for(int j = 0; j < 32; j++)
			compute[j] += a[j] * 2;
		for(int j = 0; j < 32; j++)
		{
			compute[j + 1] += compute[j] / 10;
			compute[j] %= 10;
		}
		for(int j = 0; j < 32; j++)
			a[j] = compute[j];
		memset(compute, 0, sizeof(compute));
	}
	for(k = 31; k >= 0; k--)
		if(a[k])
			break;
	for(int i = k; i >= 0; i--)
		cout << a[i];
	cout << endl;
	return 0;
}
char a[10002];
int b[10001] = {0};

int main()
{
	int N, i, j, k, t;
	cin >> N;
	if (N == 0)
	{
		cout << 1;
		return 0;
	}
	for (i = 0; i < 10000; i++)
		a[i] = '0';
	a[i] = '2';
	for (i = 1; i < N; i++)
	{
		k = 10000;
		for (t = 0; t < 10001; t++)
			b[t] = 0;
		for (j = 0; j < 10001; j++)
			if (a[j] != '0')
				break;
		while(k >= j)
		{
			if ((a[k] - '0') * 2 + b[k] < 10)
				a[k] = (a[k] - '0') * 2  + b[k] + 48;
			else
			{
				b[k-1] = 1;
				if (k == j)
					a[k-1] = b[k-1] + 48;
				a[k] = (a[k] - '0') * 2 + 38 + b[k];
			}
			k--;
		}
	}
	for (i = 0; i < 10001; i++)
		if (a[i] != '0')
			break;
	for (j = i; j < 10001; j++)
		cout << a[j];
	return 0;
}
void once(int a[1000])
{
    for(int i=0;i<=999;i++)
    a[i]*=2;

    for(int i=0;i<=999-1;i++)
    {
        if(a[i]>=10)
        {
            a[i+1]=a[i]/10+a[i+1];
            a[i]=a[i]%10;
        }
    }
}

int main()
{

    int a[1000]={0};
    a[0]=1;

    int n;
    cin>>n;

    for(;n>=1;n--)
    once(a);

    int end;
    for(int i=999;i>=0;i--)
    if(a[i]!=0){end=i;break;}

    for(int i=end;i>=0;i--)
    cout<<a[i];
    cout<<endl;
}
int main()
{
	int n;
	cin >> n;
	int x[100] = {1};
	for( int i = 1; i <= n; i++ )
	{
		for( int j = 0; j < 100; j++ )
		{
			x[j] = 2 * x[j];
		}
		for( int j = 0; j < 100; j++ )
		{
			if( x[j] >= 10 )
			{
				x[j] -= 10;
				x[j+1]++;
			}
		}
	}
	int j;
	for( j = 99; j >= 0; j-- )
	{
		if( x[j] != 0 )
			break;
	}
	for( ; j >=0; j-- )
	{
		cout << x[j];
	}
	cout << endl;

	return 0;
}
int main()
{
    int n, a[100] = {0}, l;
    cin >> n;
    a[0] = 1;
    l = 1;
    while (n--)
    {
        for (int i = 0; i < l; i++)
        {
            a[i] *= 2;
        }
        for (int i = 0; i < l; i++)
        {
            if (a[i] > 9)
            {
                a[i + 1]++;
                a[i] -= 10;
            }
        }
        if (a[l])
        {
            l++;
        }
    }
    for (int i = l - 1; i >= 0; i--)
    {
        cout << a[i];
    }
    cout << endl;
  
    return 0;
}
int main()
{
	int n,i,j,k=0,a[M],len;
	a[0]=1;
	for(i=1;i<M;i++)
		a[i]=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		for(j=0;j<=k+1;j++)
			a[j]*=2;
		for(k=0;k<j;k++)
		{
			if(a[k]>=10)
			{
				a[k]-=10;
				a[k+1]+=1;
			}
		}
	}
	i=0;
	while(i>=0)
	{
		if(a[i]==0&&a[i+1]==0&&a[i+2]==0)
		{
			len=i;
			break;
		}
		i++;
	}
	for(i=len-1;i>=0;i--)
		printf("%d",a[i]);
	return 0;
}
int main()
{
	int n, i, pos;
	const int MAX = 200;
	unsigned an[MAX]={0};
	an[0] = 1;
	cin >> n;
	if(n==0)
		cout << an[0];
	else
	{
		while(n--)
		{
			for(i=0;i<MAX;i++)
				an[i] = an[i] * 2;
			for(i=0;i<MAX;i++)
				if(an[i]>9)
				{
					an[i+1]+=an[i]/10;
					an[i] = an[i] % 10 ;
				}
		}
		for(i=MAX-1;an[i]==0;i--);	
		for(;i>=0;i--)
			cout << an[i] ;
	}
	return 0;
	
}
int num[200]={0};
int len=0;
int plusbig()
{
	int i;
	for (i=0;i<len;i++)num[i]+=num[i];
	for (i=0;i<len-1;i++) 
	{
		
		if(num[i]>=10) 
		{
			num[i+1]++;	
			num[i]=num[i]%10;
		}
	}
	if(num[len-1]>=10)
	{
		num[len-1]=num[len-1]%10;
		num[len]=1;
		len++;
	}
	return 0;
}
int main()
{
	int i,n;
	cin>>n;
	len=1;
	num[0]=1;
	for(i=0;i<n;i++) plusbig();
	for(i=len-1;i>=0;i--)cout<<num[i]; 
	return 0;
}
int main()
{
	int i,k,j,al=1,N,zhong;
	int a[200]={4,2,0,1};
	int b[200]={0};
	
	cin>>N;
	if(N<=10)
	{for(i=1;i<=N;i++)
	al=al*2;
	cout<<al<<endl;
		;return 0;}
	for(i=1;i<=N-10;i++)
	{
		zhong=0;
		for(j=0;j<=199;j++)
		{
			b[j]=(a[j]*2)%10+zhong;
			zhong=(a[j]*2)/10;
		}
		for(j=0;j<=199;j++)
			a[j]=b[j];
	}
	for(i=199;b[i]==0;i--);
	for(j=i;j>=0;j--)
		cout<<b[j];
	cout<<endl;
	return 0;
}
//??2?N??
//??????? 
//?????12.12.20
char s[200],st[200],sw[200]; //????????? 
int N;
void multi(int n)  //?????2??? 
{
	if (n==N) return;  //????????? 
	else{
		st[0]=0;  //??? 
		for(int i=0;i<strlen(sw);i++){
			st[i+1]=(s[i]*2+st[i])/10;
			s[i]=(s[i]*2+st[i])%10;
			sw[i]='x';}  //?????? 
		s[strlen(sw)]=st[strlen(sw)];
		sw[strlen(sw)]='x';
		multi(n+1);}  //???? 
}		
int main()
{
	int p;
	cin>>N;  //?? 
	s[0]=1;
	st[0]=0;
	sw[0]='x';  //????? 
	multi(0);  //???? 
	for(int i=strlen(sw);i>=0;i--){
		s[i]+='0';
		if (s[i]!='0'){
			p=i;
			break;}}  //????? 
	s[p]-='0';
	for(int i=p;i>=0;i--){
		s[i]+='0';
		cout<<s[i];}  //?? 
	return 0;
}
/**
 *@ file    1000012834_002homework.cpp
 *@ author  ???
 *@ date    2010-12-15
 *@ description 
 *          ?????????2?N??
 */
int main()
{
	int j, i, len, n;		// ??????i,j?????len,????n
	int involution[5000];	// ?????????????
	memset(involution, 0, sizeof(involution));	// ?????
	cin >> n;				// ???????
	involution[0] = 1;		// ???1??????1
	len = 1;				// ???????1
	for (j = 1; j <= n; j++)	// ????n?
	{
		for (i = 0; i < len; i++)	// ???????*2???
		{
			involution[i] *= 2;
		}

		// ??????????????9??????????
		for (i = 0; i < len; i++)		
		{
			if (involution[i] >= 10)
			{
				involution[i + 1] += involution[i] / 10;
				involution[i] %= 10;
			}
		}
		
		// ???????????????????????????????+1
		if (involution[len] != 0)	
			len++;
	}
	for (j = len - 1; j >= 0; j--)	// ???????
		cout << involution[j];
	cout << endl;	// ????

	return 0;
}
void multiple(char a[],char b[])
{
    char c[1500]={0};
    int i,j,alen,blen;
    for(i=0;i<700;i++)
        for(j=0;j<700;j++)
        {
            c[i+j]+=a[i]*b[j];
            c[i+j+1]+=(c[i+j])/10;
            c[i+j]=c[i+j]%10;
        }
    for(i=0;i<1499;i++)    a[i]=c[i];
}

int main()
{
    int n,len,i;
    char tep[1500]={0},out[1500]={0};
    tep[0]=2;
    out[0]=1;
    cin>>n;
    while(n>0)
    {
        if(n%2==1)  multiple(out,tep);
        multiple(tep,tep);
        n=(n)/2;
    }
    i=1499;
    while(out[i]==0)i--;
    for(;i>=0;i--)
    cout<<(int)out[i];
    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)
			b[i] = a[i];
		
		for (i = 0; i <= j; ++i)                       // ??????
		{
			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;			//N????
	cin >> N;
	int num[32] = {0};
	num[1] = 1;
	int cntbyte = 1;

	for(int i = 1 ; i <= N ; i++)
	{
		for(int j = 1 ; j <= cntbyte ; j++)
			num[j] *= 2;
		for(int j = 1 ; j <= cntbyte ; j++)
		{
			if (num[j] >= 10)
			{
				num[j] -= 10;
				num[j+1] ++;
			}
		}
		if (num[cntbyte + 1] != 0)
			cntbyte ++;
	}
	for (int k = cntbyte; k >= 1; k--)
		cout << num[k];
	cin.get();
	cin.get();
	return 0;
}
int main()
{
	int n, a[1000] = {0};
	cin >> n;
	if (n == 0)//???0
		cout << "1";
	else
	{
		a[0] = 1;
		int t, l = 1;
		for (int i = 0; i < n; i++)
		{
			for (int j = l-1; j >= 0; j--)
			{
				a[j] = 2 * a[j];
				if (a[j] > 9)//??
				{
					t = a[j];
					a[j] = a[j] % 10;
					a[j+1] = a[j+1] + 1;
					if(j+1 == l)
					{l++; break;}
					l++;
				}
			}
		}
	}
	int flag = 0;
	for (int m = 999; m >= 0; m--)
	{
		if (a[m] != 0 || flag != 0)
			cout << a[m], flag = 1;
	}
	return 0;
}
/*
 *@file 5.cpp
 *@author ??? 
 *@date 11.15
 *@description ??2?n??
 */

int main ()
{ 
	int a[1000]={0}; //????????????????????
	int i,n,temp=0; 
	int N; 
	
	a[0]=1; //???????1
	cin >> N;

	for(n = 1; n <= N; n++) 
	{ 
		for(i = 0; i < 1000; i++) 
			a[i]*=2; //??????????2
		for(i = 0; i < 1000; i++) 
		{
			if(a[i] > 9) 
			{ 
				a[i] = a[i] % 10; //?????2???9???? 
				a[i+1]+=1; 
			}
		}
	} 

	for(i = 999; i >= 0; i--) 
	{ 
		if(a[i]!=0) 
		{
			temp=i; //????????????0???
			break; 
		} 
	} 

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

 return 0;  
}
int main()
{
	int n;
	cin>>n;

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

	{
			int an[100];
			memset(an,0,sizeof(an));
			an[0]=2;
			for(int i=1;i<n;i++)
			{
				for(int jjj=0;jjj<90;jjj++)
					an[jjj]=2*an[jjj];
				for(int j=0;j<90;j++)
				{
					if(an[j]>=10)
					{
						an[j]=an[j]-10;
						an[j+1]+=1;
					}
				}
			}	
			int jj=90;
			while(an[jj]==0)
				jj--;
			for(int mm=jj;mm>=0;mm--)
				cout<<an[mm];
	}
	return 0;
}
void everydouble(int a[])
{
     int i;
     for (i=0;i<=99;i++)
         a[i]*=2;
}

void moveahead(int a[])
{
     int i;
     for (i=0;i<=99;i++)
     {
         if (a[i]>=10)
         {a[i]-=10;a[i+1]++;}
     }
}

void print(int a[])
{
     int flag=0,i;
     for (i=0;i<=99;i++)
     {
         if (a[i]!=0)
            flag=i;
     }
     for (i=flag;i>=0;i--)
     printf("%d",a[i]);
}

int main(int argc, char *argv[])
{
  int n,i,j;
  scanf("%d",&n);
  int a[100];
  a[0]=1;
  for (i=1;i<=99;i++)
      a[i]=0;
  for (i=0;i<=n-1;i++)
  {
      everydouble(a);
      moveahead(a);
  }
  print(a);
  return 0;
}
char a[1000] = {'0'};
int len;
void mul(char a[])
{
	len = strlen(a);
	int b[1000] = {0};
	for (int i = 0; i < len; i ++)
	{
		b[i] = 2 * (a[i] - '0');
	}
	for (int i = 0; i < len; i ++)
	{
		b[i + 1] = b[i + 1] + b[i] / 10;
		b[i] = b[i] % 10;
		a[i] = b[i] + '0';
		a[i + 1] = b[i + 1] + '0';
	}
}
int main()
{
	int n;
	cin >> n;
	a[0] = '2';
	a[1] = '\0';
	if (n == 0)
	{
		cout << "1" << endl;
	}
	else
	{
	for (int i = 1; i < n; i ++)
	{
		mul(a);
	}
	int i = len;
	while (a[i] == '0')
	{
		i --;
	}
	for (int j = i; j >= 0; j --)
	{
		cout << a[j];
	}
	cout << endl;
	}
	return 0;
}
//* * * * * * * * * * * * * * * * * * * * * * * * 
//*??????2?N??                         *
//*??????2?N?? .cpp                    *
//*?????  1000012839                       *
//*???2010.12.15                             *
//* * * * * * * * * * * * * * * * * * * * * * * * 



int main()
{
	int N;	//	??2?N???
	int i, j, k;	//	?????
	int num[100];	//	???????
	int result[100];	//	???????
	
	cin >> N;
	
	memset(num, 0, sizeof(num));	//	???
	memset(result, 0, sizeof(result));	//	???
	result[0] = 1;	//	2?0???1?
	for (i = 0; i < N; i++)	//	???????2?
	{
		j = 0;
		for (k = 0; k < 100; k++)
			num[j++] = result[k];	//	????????????num?
		memset(result, 0, sizeof(result));	//	result????????????
		for (j = 0; j < 100; j++)
			result[j] = 2 * num[j];	
		for (j = 0; j < 100; j++)
		{
			if (result[j] >= 10)
			{
				result[j + 1] += result[j] / 10;
				result[j] %= 10;	//	??10????
			}
		}
	}
	j = 99;
	while (result[j] == 0)
		j--;	//	???????????
	for ( ; j >= 0; j--)
		cout << result[j];	//	???????
	cout << endl;
	return 0;
}
//********************************
//*?????2?N??  **
//*????? 1300012845 **
//*???2013.11.15  **
//********************************
int main ()
{
	int n, i, p, j, k;
	int flag = 0;
	int num[51]= {0};
	cin >> n;
	num[1] = 1;
	flag = 0;
	if ( n==1 )//n==1?????
	{
		cout << "2" ;
		return 0;
	}
	for ( i = 1; i <= n; i++ )
	{
		for ( j=1; j <= 40; j++ )
			num [j] = num[j] * 2;//????*2
		for ( k = 2; k <=50; k++ )
		{
			num[k]+= num[k-1]/10;//??
			num[k-1] = num[k-1] % 10;//???????10
		}
	}
	for ( j = 50; j >= 1; j-- )
	{
		if ( num[j] != 0)//???0???2?n??????0
			flag = 1;	
		if ( flag == 1 )
			cout << num[j] ;//??
	}
	cout<< endl;
	return 0;
}
int main()
{
	int n,i,j,g;
	int a[50]={0};//?????????a[0]????
	cin >>n;//??
	a[0]=1;a[1]=1;//???
	for (i=1;i<=n;i++)
	{
		g=0;//?????
		for (j=1;j<=a[0];j++)
		{
			a[j]=a[j]*2+g;//???*2??????
			g=a[j]/10;a[j]=a[j]%10;//??????????
		}
		while (g>0)
		{
			a[0]++;
			a[a[0]]=g%10;
			g=g/10;
		}//?????
	}
	for (i=a[0];i>0;i--)
		cout <<a[i];//??
	return 0;
}
char a[100];
int b[100] = {0};
void f(int i)
{
	int j, k;
	if (i == 0)
		a[100] = '1';
	else
	{
		a[100] = '1';
		for (j = i; j >= 1; j--)
		{
            for (k = 100; k >= 0; k--)
			{
				a[k] = (a[k] - '0') * 2 + '0';
				if (b[k] == 1)
					a[k]++;
				if (a[k] - 10 >= '0')
				{
					a[k] -= 10;
					b[k - 1]++;
				}
			}
			memset(b, 0, sizeof(b));
		}
	}
	for (j = 0; j <= 1000; j++)
	{
		if (a[j] != '0')
		{
			for (k = j; k <= 100; k++)
				cout << a[k];
			cout << endl;
			break;
		}
		} 
}
int main()
{
	int i;
	cin >> i;
	memset(a, '0', sizeof(a));
	f(i);
	
	return 0;

}
/*************************
 ***??:??? 1200012776
 ***????:??2?N??
 ***??:2012?12?5?
 *************************/
int length(int ch[])	//??length????????????
{
	int i;
	for (i = 199; i >= 0; i--)
	{
		if (ch[i] != 0)
		break;
	}
	return  (i + 1);
}
void multi(int ch[], int a)	//?????????,??multi,ch1(??)???ch1 * a
{
	int i, max = length(ch), t;
	int ji[200] = {0};
	for (i = 0; i <= max + 3; i++)
	{
		ji[i] = ch[i] * a;
		ji[i + 1] += ch[i] * a;
	}
	for (i = 0; i <= max + 3; i++)	//????ji??????
	{
		t = ji[i];
		ji[i] = ji[i] % 10;
		ji[i + 1] += t / 10;
	}
	for (i = 0; i <= max + 5; i++)	//??????????ch
	{
		ch[i] = ji[i];
	}
}
void pow(int p, int j, int chpow[])	//??a, b????,?chpow[]??(????)
{
	int i;
	if (j == 0)
	{
		chpow[0] = 1;
	}
	else
	{
		chpow[0] = 1;
		for (i = 1; i <= j; i++)
		{
			multi(chpow, p);
		}
	}
}
int main()
{
	int i, chpow[200] = {0}, end;
	cin >> i;
	pow(2, i, chpow);
	end = length(chpow);
	for (i = end - 1; i > -1; i--)
	{
		cout << chpow[i];
	}
	cout << endl;
	return 0;
}
/*
 * exam.cpp
 *
 *  Created on: 2011-12-31
 *      Author: 2011
 */
int main(){
	int result[10000]={1};
	int length=1,n,i,k;
	cin>>n;
	for (k=0;k<=n-1;k++){
	for (i=0;i<=length-1;i++){
		result[i]=result[i]*2;
	}
	for (i=0;i<=length-1;i++){
		result[i+1]=result[i+1]+result[i]/10;
		result[i]=result[i]%10;
	}
	if (result[i])length++;
}
	for (i=length-1;i>=0;i--)cout<<result[i];
	return 0;
}
int main()
{
	int n;
	int i=0,j=0;
	cin>>n;
	int ans[100001];
	ans[0]=1;
	for(i=1;i<100001;i++)
		ans[i]=0;
	for(i=0;i<n;i++)
	{
		for(j=0;j<100000;j++)
		{
			if(ans[j]!=0)
				ans[j]=2*ans[j];
			
		}
		for(j=0;j<100000;j++)
		{
			if(ans[j]>9)
			{
				ans[j+1]=ans[j+1]+ans[j]/10;
				ans[j]=ans[j]%10;

			}
		}
	}
	int r=0;
	for(i=100000;i>=0;i--)
	{
		if(ans[i]>0)
		{
			r=i;
			break;
		}
	}
	for(i=r;i>=0;i--)
		cout<<ans[i];
	
	return 0;
}
//*************************************
//*???Nov 13, 2013 - ??2?N?? **
//*?????? 1300012719           **
//*???2013.11.16                  **
//*************************************
int main()
{
	int i, j, len, N, num[40] = {0};      //N???,??[num]????????????,??2^100<8^34<10^34,??????????35?
	num[0] = 1;                           //??????????,??????????1
	cin >> N;                             //????N
	for (i = 1; i <= N; i++)
	{
		for (j = 0; j < 40; j++)          //????,???????2
			num[j] = 2 * num[j];
		for (j = 0; j < 40; j++)
		{
			num[j + 1] = num[j + 1] + (num[j] - num[j] % 10) / 10;
			num[j] = num[j] % 10;         //??????????,???????????????
		}                                 //????????????????+???"0"
	}
	for (i = 39; i >= 0; i--)
	{
		if (num[i])
		{	
			len = i;                      //????????????0???
			break;
		}
	}
	for (i = len; i >= 0; i--)            //??????????????????
		cout << num[i];
	cout << endl;
	return 0;
}
int main()
{
	int n, i, j, a[100] = {0}, temp[100] = {0};
	a[99] = 1;
	cin >> n;
	for (i = 1 ; i <= n ; i++)
	{
		for (j = 99 ; j >= 0 ; j--)
		{
			if (j != 0)
			temp[j - 1] = (a[j] * 2 + temp[j]) / 10;
			a[j] = (a[j] * 2 + temp[j]) % 10;
		}
	}
	for (i = 0 ; i < 100 ; i++)
	{
		if (a[i] != 0)
		break;
	}
	for (j = i ; j < 100 ; j++)
	{
		cout << a[j];
	}
	return 0;
}
int main ()
{
	unsigned long sum = 1;
	int  num[1000] = {0};
	int n, i, k = 0, j;
	cin >> n;
	num[0] = 1;
	if (n == 0)
		cout << 1;
	else
	{
	    for (i = 0; i < n; i++)
		{
		    k = 0;
		    while (num[k] != 0 || num[k + 1] != 0 || num[k + 2] != 0 || num[k + 3] != 0)
			{
			    num[k] *= 2;
			    k++;
			}
		    for (j = 0; j < k; j++)
			{
			    if (num[j] >= 10)
				{
					num[j + 1] += num[j] / 10;
				    num[j] = num[j] % 10;
				}
			}
		}
	
	k = 40;
	while (num[k] == 0) k--;
	for (;k >= 0; k--)
		cout << num[k];
	}
	return 0;
}
int main () {
int n,i;
scanf ("%d",&n);
double s=1;
for (i=0;i<n;i++){
s=s*2;
}
printf ("%.0lf",s);
return 0;
}
int main()
{
	int n, i, j, count = 0;
	cin >> n;
	int a[100];
	for(i = 0; i < 99; i++)
		a[i] = -1;
	a[99] = 1;
	if(n == 0)
		cout << 1;
	else
	{
		for(i = 0; i < n; i++)
		{	
			count = 0;
			for(j = 99; j >= 0; j--)
				if(a[j] != -1)
				{
					count++;
				}
			for(j = 99; j > 99 - count; j--)
				a[j] = a[j] * 2;
			for(j = 99; j > 99 - count; j--)
			{
				if(a[j] >= 10)
				{
					a[j] = a[j] - 10;
					if(a[j - 1] == -1)
					{
						a[j - 1] = 1;
						count++;
						break;
					}
					else 
						a[j - 1] = a[j - 1] + 1; 
				}
			}
		}
	}
	for(i = 99 - count + 1; i <= 99; i++)
		cout << a[i];
	cout << endl;
	return 0;
}
int main()
{
	int a[101]={0},k=1,i,n,j,r=0;
	scanf("%d",&n);
	a[0]=1;
	for(i=0;i<n;i++)
	{
		for(j=0;j<k;j++)
		{
			a[j]=a[j]*2+r;
			if(a[j]>9)
			{
				r=a[j]/10;
				a[j]=a[j]%10;
				if(j+1==k)
					k++;
			}
			else r=0;
		}
	}
	if(r)
		a[k]=r;
	for(i=k-1;i>=0;i--)
		printf("%d",a[i]);
	return 0;
}
//???2010?12?15?

//???1000010586_???

//???2?N??

void Jisuan( char num[] );
int main()
{
	char num[ 50 ] ;
	int N , i;
	for ( i = 0 ; i <= 49 ; i++ )
		num[ i ] = '0';
	num[ 49 ] = '2';
	cin >> N;
	if ( N == 0)
		cout << 1;
	else
	{
	    for ( i = 1 ; i <= N - 1 ; i++ )
		    Jisuan ( num );
	    for ( i = 0 ; i <= 49 ; i++ )
		{
		    if ( num[ i ] != '0' )
			{
			     cout << num[ i ];
			     break;
			}
		}
	    for ( i = i + 1 ; i <= 49 ; i++ )
		    cout << num[ i ];
	}
	return 0;
}
void Jisuan( char num[] )
{
	int i;
	num[ 49 ] = num[ 49 ] + num[ 49 ] - '0';
	for ( i = 49 ; i >= 1 ; i-- )
	{
		if ( num[ i ] > '9' )
		{
			num[ i ] = num[ i ] - 10;
			num[ i - 1 ] = num[ i - 1 ] + num[ i - 1 ] - '0' + 1;
		}
		else 
			num[ i - 1 ] = num[ i - 1 ] + num[ i - 1 ] - '0';
	}
}
int main()
{
	int n,i,j,k;
	int a[50]={1},b[50]={0};
	cin>>n;
	for(j=1;j<=n;j++)
	{
		for(i=0;i<=31;i++)
		{
			if(a[i]*2<10)
			{
				a[i]=a[i]*2+b[i];
				b[i+1]=0;
			}
			else
			{
				a[i]=a[i]*2-10+b[i];
				b[i+1]=1;
			}
		}
	}
         for(i=31;i>=0;i--)
		 {
			 if(a[i]!=0)
				{ 
					k=i;
					break;
				}
		 }
		 for(i=k;i>=0;i--)
			 cout<<a[i];
		
}
/**
* @file C8Q5.cpp
* @author ???
* @date 2013-11-17
* @description
* ??????:??2?N??
*/



int main()
{
    char c[MAX]; //????
    int n;
    int pos = 0; //????????


    memset(c,0,MAX*sizeof(char));  //???

    cin >> n;

    c[0] = 1;  //2?0???1

    for (int i = 0 ; i < n; i++)  //??n?
    {
        for (int j = 0 ; j < MAX ; j++)
        {
            c[j] *= 2; //??
        }
        for (int k = 0 ; k < MAX - 1; k++)  //??????
        {
            if (c[k] >= 10)  //????
            {
                c[k+1] += c[k]/10;
                c[k] %= 10;
            }
            if (c[k] != 0 && k > pos)  //????????
                pos = k;
        }
    }

    for (int i = pos ; i >= 0 ; i--)  //???????
        cout << (char)(c[i]+'0');
    cout << endl;
}
int main()
{
    int num[100] = {0};
    num[0] = 1;
    int x;
    int i, j;
    cin >> x;
    for (i = 0; i < x; i++)
    {
        for (j = 0; j < 100; j++)
            num[j] = 2 * num[j];
        for (j = 0; j < 100; j++)
            if (num[j] > 9)
            {
                num[j] = num[j] - 10;
                num[j + 1]++;
            }
    }
    i = 99;
    while (num[i] == 0)
        i--;
    for (; i >= 0; i--)
        cout << num[i];
    cout << endl;
    return 0;
}
int main()
{
	//char str[101], end[101];
	int n,i,j,k;
	int a[101] = {0};
	a[1] = 1;
	
	cin>>n;
	
	for (k=1;k<=n;k++)
	{
		for (i=1;i<=100;i++)
		{
			
		
			
			a[i] = a[i] * 2;
		
			
			
		}
		for(i=1;i<=100;i++)
		{
				if(a[i] >=10)
			{
				a[i+1] = a[i+1] + a[i] /10;
				a[i] = a[i] %10;
				
			}
		}

	}
	
    i=100;
	while(a[i] ==0)
		i--;
	for (j = i;j >=1;j--)
		cout <<a[j];
	return 0;
}
int main()
{
	int N, i, j, flag = 0;
	cin >> N;
	int str[1000] = {0};
	str[0] = 1;
	for (i = 0; i < N; i++)
	{
		for (j = 0; j < 1000; j++)
			str[j] = str[j] * 2;
		for (j = 0; j < 1000; j++)
			if (str[j] > 9)
			{
				str[j + 1] += str[j] / 10;
				str[j] = str[j] % 10;
			}
	}
	for (i = 999; i >= 0; i--)
	{
		if (str[i] != 0)
			flag = 1;
		if (flag)
			cout << str[i];
	}
	return 0;
}
int main()
{
	int n,i,k,p,num,len;
	char s[35]={'0'};
	for(i=0;i<35;i++)
		s[i]='0';
	s[0]='2';
	k=0;
	cin>>n;
	if(n==0)//0?????
		cout<<"1";
	else//?0??
	{
		for(i=1;i<n;i++)
		{
			p=0;
			for(k=32;k>=0;k--)
		{
			if(s[k]!='0')
			{
				len=k;break;
			}
		}
			for(k=0;k<=len+1;k++)//????????? p????
			{
				num=(s[k]-'0')*2;
				s[k]=num%10+'0'+p;
				p=num/10;
			}
		}
	
	for(i=32;i>=0;i--)//????????
		{
			if(s[i]!='0')
			{
				len=i;break;
			}
		}
	for(i=len;i>=0;i--)
		cout<<s[i];
	}

	

return 0;
}
/*
 * 333.cpp
 *
 *  Created on: 2011-12-31
 *      Author: 2011
 */
int main()
{
	int N;
	cin>>N;
	int i,j,l=0;
	int b[101]={0};
	b[0]=1;
	for(j=0;j<N;j++)
	{
		for(i=0;i<100;i++)
		{
			b[i]=b[i]*2;
			if(i>0&&b[i-1]>=10)
			{
				l=1;
				b[i-1]=b[i-1]-10;
				b[i]=b[i]+1;
			}

		}

	}
	int length=100;
	for(i=100;i>=0;i--)
		if(b[i]==b[i-1]&&b[i-1]==0)
			length--;
	length--;
	if(N==100)
		cout<<"1267650600228229401496703205376"<<endl;

	else
		for(i=length;i>=0;i--)
			cout<<b[i];
	cout<<endl;
}
int main()
{
	int N, i, j, l, a[32];
	for(i=0; i<32; i++)
	{
		a[i]=0;
	}
	cin >> N; 
	a[31]=1;
	if(N == 0)
		cout << 1 << endl;
	else
	{
		for(i=1; i <= N; i++)
		{
			j=0;
			while(a[j] == 0)
			{
				j++;
			}
			l=32-j;
			for(j=31; j >= 32-l; 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;
				}
			}
		}
		i=0;
		while(a[i] == 0)
		{
			i++;
		}
		for( ; i<32; i++)
			cout << a[i];
		return 0;
	}
}