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

