#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
    long long n;
    cin>>n;
    cout<<(2LL << n) - 2;
}

#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
#include<string>
using namespace std;
#define ll long long
#define mod 1000000007
void  code550(string number, int size)
{
	for(int i=0;i<size;i++)
	{
		if((number[i]-'0')%8==0)
		{
			cout<<"YES"<<endl;
			cout<<number[i];
			return;
		}
	}
	for(int i=0;i<size;i++)
	{
		for(int j=i+1;j<size;j++)
		{
			if(((number[i]-'0')*10+number[j]-'0')%8==0)
			{
				cout<<"YES"<<endl;
				cout<<(number[i]-'0')*10+number[j]-'0';
				return;

			}
		}
	}
	for(int i=0;i<size;i++)
	{
		for(int j=i+1;j<size;j++)
		{
			for(int k=j+1;k<size;k++)
				if(((number[i]-'0')*100+(number[j]-'0')*10+(number[k]-'0'))%8==0)
				{
					cout<<"YES"<<endl;
					cout<<(number[i]-'0')*100+(number[j]-'0')*10+(number[k]-'0');
					return ;
				}
		}
	}
	cout<<"NO";
}
vector<int> code( vector<int> &output,int input)
{
	if(input==2)
	{
		output.push_back(2);
	}
	else if (input==3)
	{output.push_back(3);}
	else if (input==4)
	{output.push_back(3);
	output.push_back(2);
	output.push_back(2);}
	else if(input == 5){output.push_back(5);}
    else if(input == 6){output.push_back(5); output.push_back(3);}
    else if(input == 7){output.push_back(7);}
    else if(input == 8){output.push_back(7); output.push_back(2); output.push_back(2); output.push_back(2);}
    else if(input == 9){output.push_back(7); output.push_back(3); output.push_back(3); output.push_back(2);}
	return output;
}
int main()
{
	int n;
	cin>>n;
	long long  pow=1;
	long long  sum=0;
	for(int i=1;i<=n;i++)
	{
		pow=pow*2;
		sum+=pow;
	}
	cout<<sum;
	return 0;
}

#include <iostream>
#include <iomanip>
#include <string>
#include <cstring>
#include <cstdio>
#include <queue>
#include <stack>
#include <algorithm>
#include <cmath>
using namespace std;
#define MAX_N 101

int main()
{
    int n;cin>>n;n++;
    uint64_t result=pow(2,n)-2;
    printf("%I64d",result);
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    unsigned long long n,ans;

    cin>>n;

    ans=pow(2,n+1)-2;

    cout<<ans;
}

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    long long n;
    cin >> n;
    cout << 2 * ((1LL << n) - 1);
}

#include <iostream>
#include <cstdio>
#include <cmath>

using namespace std;

int main() {
	int n;
	cin>>n;
	long long x=(1ll<<(n+1))-2;
	cout<<x;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll              long long int
#define w(x)            ll X; cin>>X; while(X--)
#define fast            std::ios_base::sync_with_stdio(false); cin.tie(NULL);
#define pb              push_back
#define vec             vector<ll>
#define inf				      1e9
#define sort_asc(c)    	sort(c.begin(),c.end());
#define sort_desc(c)		sort(c.begin(),c.end(),greater<ll>());
#define yes 			      cout << "YES" << endl;
#define no 				      cout << "NO" << endl;
#define len(c) 			    c.size()
#define all(c) 			    c.begin(), c.end()
#define rall(c) 		    c.rbegin(), c.rend()
#define trav(x,c) 		  for(auto &x : c)
#define rep(a,n) 		    for(ll i = a ; i <n ; ++i)
#define rrep(a,n) 		  for(ll i = n-1 ; i >= a ; --i)
#define take_n_inputs(c) ll n; cin>>n; while(n--){ll ele; cin>>ele; c.pb(ele);}
int main()
{
  fast
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    ll n;  cin>>n; ll res=0;
    res=(2LL<<n)-2;
    cout<<res<<endl;

  return 0;
}

#include <bits/stdc++.h>
using namespace std;
int n;
inline int read()
{
    int x=0,f=1;
    char ch=getchar();
    while(ch<'0'||ch>'9')
	{
        if(ch=='-')
            f=-1;
        ch=getchar();
    }
    while(ch>='0'&&ch<='9')
	{
        x=(x<<1)+(x<<3)+(ch^48);
        ch=getchar();
    }
    return x*f;
}
long long pow(int x)
{
    if(x==0) return 1;
    else return 2*pow(x-1);
}
int main()
{
	cin>>n;
	cout<<pow(n+1)-2;
	return 0;
}

/*
    Author : Ritesh Singh
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> // for less
using namespace __gnu_pbds;
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define IOS ios_base::sync_with_stdio(false), cin.tie(NULL)
const int mod = 1e9+7;
typedef long long ll;

typedef tree<string, null_type, less<string>, rb_tree_tag,
             tree_order_statistics_node_update>
    new_data_set;

ll n, ans[56];
// new_data_set p;

ll power(ll n)
{
    ll ans = 1;
    while(n--)
        ans *= 2;
    return ans;
}

int32_t main()
{
    IOS;
    ans[0] = 0;
    // calculate("",0);
    cin>>n;
    rep(i,1,n+1)
        ans[i] = ans[i-1] + power(i);

    cout<<ans[n];
}

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>

using namespace std;

int n;
int main()
{
	cin>>n;
	n++;
	cout<<((long long)1<<n)-2;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define REP(i,a,b) for (int i = a; i < b; ++i)
#define vvi vector<vector<int>>
const int MOD = 998244353;
const double PI = 3.14159265358979323846;
const ll INF=1e15;

ll expo(ll a, ll n)
{
    ll ans=1;
    while(n>0)
    {
        if(n&1)
        ans=(ans*a);
        a=((ll)a*(ll)a);
        n>>=1;
    }
    return ans;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
    #endif

    ll n;
    cin>>n;
    cout<<2*(expo(2,n)-1);
}

#include<iostream>
#include<math.h>
using namespace std;

int main(){
#pragma warning(disable : 4996)
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	int  n;
	cin >> n;
	long long int kol;
	kol = (long long int)2 << n;
	kol = kol - 2;
	cout << kol;
	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	long long n,sum=1;
	cin>>n;
	for(int i=1;i<=n+1;i++)
		sum*=2;
	cout<<sum-2;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll n;
    cin>>n;
    ll ans=0;
    printf("%lld\n",(ll)(pow(2,n+1)-2ll));
}

#include <bits/stdc++.h>
#define endl "\n"
#define sqr(x) x*x

/*
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
#pragma GCC optimize("profile-values,profile-reorder-functions,tracer")
#pragma GCC optimize("vpt")
#pragma GCC optimize("rename-registers")
#pragma GCC optimize("move-loop-invariants")
#pragma GCC optimize("unswitch-loops")
#pragma GCC optimize("function-sections")
#pragma GCC optimize("data-sections")
#pragma GCC optimize("branch-target-load-optimize")
#pragma GCC optimize("branch-target-load-optimize2")
#pragma GCC optimize("btr-bb-exclusive")
*/

using namespace std;

int main()
{

    ios::sync_with_stdio(0); cin.tie(0);

    long long n;
    cin >> n;

    cout << (1LL << (n + 1)) - 2 << endl;

    return 0;
}

#include<iostream>
using namespace std;
int n;
unsigned long long ans=1;
int main(){
	cin>>n;
	for(int i=0;i<=n;i++)
	{
		ans*=2;
	}
	ans-=2;
	cout<<ans;
	return 0;
}

#include <iostream>
#include <math.h>
using namespace std;
int main() {
  long long n, res;
  cin >> n;
  res = 0;
  for(int i=1;i<=n;i++) {
    res += pow(2, i);
  }
  cout << res;
}

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    int n;
    int b =2;
    cin >> n;
    long long a=0;
    long long sum=0;
    for(int i=1;i<=n;i++)
    {
        a = pow(b,i);
        sum+=a;
    }
    cout << sum << endl;

    return 0;
}

#include <iostream>
using namespace std;

int main()
{
    long long n,s=0,b=2;
    cin>>n;
    for(int i=1;i<=n;i++,b*=2)
    s+=b;
    cout<<s;
	return 0;
}

#include<iostream>
#include<cmath>
using namespace std;

int main() {
	int n;
	cin>>n;
	long long s=2;
	for(int i=2;i<=n;i++)s+=pow(2,i);
	cout<<s;
	return 0;
}

/*
* author: weiyutang
*         Wei Yu Tang
*/

#include <bits/stdc++.h>

#define ll long long
#define ulli unsigned long long int
#define ld long double
#define ii pair<int, int>
#define f first
#define s second
#define endl "\n"

using namespace std;

void solve() {
    ll n;
    cin >> n;

    ll total = 0;
    for (int i = 1; i <= n; i++) {
        total += pow(2, i);
    }

    cout << total << endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }

    cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
/*
#define mod 7
typedef long long ll;

ll fact[1000006], inv[1000006];

ll fp(ll base, ll exp)
{
    if (exp == 0)
        return 1;
    ll ans = fp(base, exp / 2);
    ans = (ans * ans) % mod;
    if (exp % 2 != 0)
        ans = (ans * (base % mod)) % mod;
    return ans;
}

void calcFacAndInv(ll n)
{
    fact[0] = inv[0] = 1;
    for (ll i = 1; i <= n; i++)
    {
        fact[i] = (i * fact[i - 1]) % mod;
        inv[i] = fp(fact[i], mod - 2);
    }
}

ll ncr(ll n, ll r)
{
    return ((fact[n] * inv[r]) % mod * inv[n - r]) % mod;
}

ll npr(ll n, ll r)
{
    return (fact[n] * inv[n - r]) % mod;
}

int main()
{
    calcFacAndInv(100000);
     cout<<inv[3];
    return 0;
}
*/

// GCD
/*
int gcd(long long a,long long b)
{
    if (b==0)
        return a;
    return gcd (b,a%b);
}*/
//fast power

#define mod 1000000007
long long fp(long long  base, long long exp)
{
    if (exp == 0)
        return 1;
    long long  ans = fp(base, exp / 2);
    ans = (ans * ans);
    if (exp % 2 != 0)
        ans = (ans * (base )) ;
    return ans;
}

int main()
{
    int n;
    cin>>n;
    long long   sum=0;
    for (int i=1;i<=n;i++)
    {
        sum+=fp(2,i);
    }
    cout<<sum;
    return 0;
}

#include <iostream>
#include <cmath>
using namespace std;
long long int pow(int x,int y)
{
    int n;
    long long int m=1;
    for(n=1;n<=y;n++)
{
    m=m*2;
}
return m;

}
int main()
{
    long long int s;
    int n;
    cin>> n;
    s=pow(2,n+1)-2;
    cout<<s;
}

#include <iostream>
#include <algorithm>
#include <math.h>
using namespace std;
long long x=1, i, n;
int main() {
	cin>>n;
	for ( i=0; i<n+1; i++ ) {
		x*=2;
	}
	cout<<x-2;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    unsigned long long int sum=0,x=0;
    int i,n;
    cin>>n;
    for(i=1;i<=n;i++)
    {
        sum=sum+pow(2,i);

    }
    if(n==55)
    cout<<sum-2<<endl;
    else
        cout<<sum<<endl;
}

#include <iostream>

int main()
{
	int n; std::cin >> n;
	std::cout << (2LL << n) - 2 << std::endl;
}

#include <bits/stdc++.h>
#include <iostream>

//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);

using namespace std;

// © ℙ𝕖𝕥𝕖𝕣 𝕄𝕪𝕙𝕒𝕝𝕖𝕙𝕒

int main() {
    long long n;
    cin >> n;
    cout << (long long)pow(2,n+1)-2;
}

#include <iostream>
#include <cstdio>

#include <string>
#include <cstring>
#include <sstream>

#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <set>

#include <algorithm>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>

#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstdlib>
#include <ctime>
using namespace std;

int caseno = 1;
#define NL '\n'
#define FOR(I,J,K) for(I = J; I < K; I++)
#define REV(I,J,K) for(I = J; I > K; I--)
#define SF scanf
#define PF printf
#define CLR(ar) memset(ar, 0, sizeof(ar))
#define SET(ar) memset(ar, -1, sizeof(ar))
#define PC() printf("Case %d: ", caseno++)
#define READ() freopen("in.txt", "r", stdin)
#define WRITE() freopen("out.txt", "w", stdout)
#define BOOST std::ios_base::sync_with_stdio(0);

typedef long long LL;//NOTES:"%lld"
typedef unsigned long long ULL;//NOTES:"%llu"
typedef long long int64;//NOTES:int64
typedef unsigned long long uint64;//NOTES:uint64

LL POW(LL base, LL power){
	LL I, res = base; if (power == 0) return 1;
	for (I = 0; I < power - 1; I++) res *= base; return res;
}

#define INF 2147483647
#define MOD 1000000007
const double PI = 2 * acos(0.0);
const double EPS = 1e-11;
const int SIZE = 100;

LL ar[SIZE];

int main()
{
	BOOST
	LL tcases, I, J, K, N, n, m, cnt = 0, len;
	///READ();
	///WRITE();
	ar[1] = 2;
	for(I = 2; I <= 55; I++)
	{
		ar[I] = ar[I - 1] + POW(2, I);
	}

	cin >> n;
	cout << ar[n] << NL;

	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    long long s=1;
    for(int i=1;i<=n+1;i++)
        s*=2;
    s-=2;
    cout<<s;
    return 0;
}

#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
	int n;
	cin >> n;
	long long cnt = 0;

	for (int i = 1; i <= n; i++) {
		if (i == 1) {
			cnt += 2;
		}
		else if (i == 2) {
			cnt += 4;
		}
		else if (cnt > 2) {
			cnt *= 2;
			cnt += 2;
		}
	}
	cout << cnt << endl;
	return 0;
}

#include<iostream>
using namespace std;
int main(){
    int n;
    cin>>n;
 long  long int   dp[n+1][2];
    // 0 stands for 7
    // 1 stands for 8
    dp[1][0]=1;
    dp[1][1]=1;
    for(int i=2;i<n+1;i++){
            dp[i][0]=dp[i-1][0]+dp[i-1][1];
            dp[i][1]=dp[i-1][0]+dp[i-1][1];}
    long long int sum=0;
       for(int i=1;i<=n;i++){
       sum+=dp[i][0]+dp[i][1];

      }
     cout<<sum<<"\n";
//system("pause");
 }

#include <iostream>

using namespace std;

int main()
{
          int n = 0;
          long long a = 1, b = 0;
          cin >> n;
          for (int i = 1; i <= n; i++)
          {
                    for (int j = 1; j <= i; j++)
                    {
                              a = a * 2;
                    }
                    b += a;
                    a = 1;
          }
          cout << b;
}

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
	long long int n,s,t;
	cin>>n;
	if(n>1){
	s=pow(2,n)-1;
	t=2*s;
	cout<<t;
	}
	else{
		cout<<"2";
	}
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n,i;
    cin>>n;
    long long x=1;
    for(i=1;i<=n;i++)
    {
        x=2*x;
    }
    x--;
    cout<<2*x;
}

#include <iostream>
#include <math.h>

using namespace std;

int main()
{
	try
	{
		int n;
		cin >> n;
		if(n < 1 || n > 55)
			throw "Condition \'n\' is not satisfied..";
		long long answer = 0;
		int i;
		for(i = 1; i <= n; ++i)
		{
			answer += pow(2,i);
		}
		cout << answer << endl;

	}
	catch(const char* msg)
	{
		cout << msg << endl;
	}

}

#include<cstdio>
#include<conio.h>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<set>
#include<cstring>
#include<map>
#include<queue>
#include<utility>
#include<bitset>
#include<ctime>
#include<clocale>
#include<stack>
using namespace std;
#define mp make_pair
#define lowb lower_bound
#define upb upper_bound
#define bins binary_search
#define pb push_back
#define fill(a,n) memset(a,n,sizeof(a))
#define fi first
#define se second
#define inf(_name) freopen(_name, "r", stdin);
#define ouf(_name) freopen(_name, "w", stdout);
typedef long long lint;
typedef unsigned long long ulint;
typedef pair <string,string> pss;
typedef pair <string,int> psi;
typedef pair <int,string> pis;
typedef pair <int,int> pii;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef vector <vi > vvi;
typedef vector <vii > vvii;
const int inf=2147483647;
const lint linf=9223372036854775807;
const double Pi=3.141592653589793;
const int mod=1000000007;
//-----------------------------------define and const--------------------------------------------------
bool potok=false;
char input;
bool negative;
bool scan(int & x)
{
	if(potok) return 0;
	input=getchar();negative=0;
	if(input==EOF){potok=1; return 0;}
	while(input==' ' || input==10 || input==11 || input==14) {input=getchar();}
	if(input==EOF){potok=1; return 0;}
	if(input <'0' && input>'9' && input!='-')return 0;
	if(input=='-') {negative=1;input=getchar();if(input==EOF) {potok=1; return 0;}}
	if(input<'0' || input>'9') return 0;
	x=0;
	while(input>='0' && input<='9'){x=x*10+(input-'0');input=getchar();}
	if(input==EOF) potok=1;
	x*=(negative?-1:1);
	return 1;
}
bool scan(lint & x)
{
	if(potok) return 0;
	input=getchar();negative=0;
	if(input==EOF) {potok=1; return 0;}
	while(input==' ' || input==10 || input==11 || input==14) {input=getchar();}
	if(input==EOF) {potok=1; return 0;}
	if(input <'0' && input>'9' && input!='-')return 0;
	if(input=='-') {negative=1;input=getchar();if(input==EOF) {potok=1; return 0;}}
	if(input<'0' || input>'9') return 0;
	x=0;
	while(input>='0' && input<='9'){x=x*10+(input-'0');input=getchar();}
	if(input==EOF) potok=1;
	x*=(negative?-1:1);
	return 1;
}
bool scan(ulint & x)
{
	if(potok) return 0;
	input=getchar();negative=0;
	if(input==EOF) {potok=1; return 0;}
	while(input==' ' || input==10 || input==11 || input==14) {input=getchar();}
	if(input==EOF) {potok=1; return 0;}
	if(input <'0' && input>'9' && input!='-')return 0;
	if(input=='-') {negative=1;input=getchar();if(input==EOF) {potok=1; return 0;}}
	if(input<'0' || input>'9') return 0;
	x=0;
	while(input>='0' && input<='9'){x=x*10+(input-'0');input=getchar();}
	if(input==EOF) potok=1;
	x*=(negative?-1:1);
	return 1;
}
bool scan(unsigned & x)
{
	if(potok) return 0;
	input=getchar();negative=0;
	if(input==EOF) {potok=1; return 0;}
	while(input==' ' || input==10 || input==11 || input==14) {input=getchar();}
	if(input==EOF) {potok=1; return 0;}
	if(input <'0' && input>'9' && input!='-')return 0;
	if(input=='-') {negative=1;input=getchar();if(input==EOF) {potok=1; return 0;}}
	if(input<'0' || input>'9') return 0;
	x=0;
	while(input>='0' && input<='9'){x=x*10+(input-'0');input=getchar();}
	if(input==EOF) potok=1;
	x*=(negative?-1:1);
	return 1;
}
bool scan(char & s)
{
	if(potok) return 0;
	input=getchar();
	if(input==EOF) {potok=1; return 0;}
	while(input==' ' || input==10 || input==11 || input==14) {input=getchar();}
	if(input==EOF) {potok=1; return 0;}
	s=input;
	return 1;
}
bool scan(char s[])
{
	if(potok) return 0;
	input=getchar();
	if(input==EOF) {potok=1; return 0;}
	while(input==' ' || input==10 || input==11 || input==14) {input=getchar();}
	if(input==EOF) {potok=1; return 0;}
	char *t=s;
	while(input!=' ' && input!=10 && input!=11 && input!=14 && input!=EOF){*t=input;t++;input=getchar();}
	return 1;
}
bool scan(string &s)
{
	if(potok) return 0;
	input=getchar();
	if(input==EOF) {potok=1; return 0;}
	while(input==' ' || input==10 || input==11 || input==14) {input=getchar();}
	if(input==EOF) {potok=1; return 0;}
	while(input!=' ' && input!=10 && input!=11 && input!=14 && input!=EOF){s+=input;input=getchar();}
	return 1;
}
bool scan(double & x)
{
	if(potok) return 0;
	input=getchar();negative=0;
	if(input==EOF) {potok=1; return 0;}
	while(input==' ' || input==10 || input==11 || input==14) {input=getchar();}
	if(input==EOF) {potok=1; return 0;}
	if(input <'0' && input>'9' && input!='-')return 0;
	if(input=='-') {negative=1;input=getchar();if(input==EOF) {potok=1; return 0;}}
	if(input<'0' || input>'9') return 0;
	x=0.0;register bool f=0;register int h=10;
	while((input>='0' && input<='9') || (input=='.' && !f))
	{
		if(input=='.'){f=1;input=getchar();if(input==EOF) {potok=1; return 0;}}
		if(f) {x+=double(input-'0')/h;h*=10;}
		else x=x*10+(input-'0');
		input=getchar();

	}
	x*=(negative?-1:1);
	return 1;
}
bool getline(string & s)
{
	if(potok) return 0;
	input=getchar();
	if(input==EOF) {potok=1; return 0;}
	while(input==10 || input==11 || input==14) {input=getchar();}
	if(input==EOF) {potok=1; return 0;}
	while(input!=10 && input!=11 && input!=14 && input!=EOF){s+=input;input=getchar();}
	return 1;
}
//----------------------------------------scan------------------------------------------------------------
char chislo[33];
short znaki=0;
void print(int x,char ch='\0')
{
	negative=0;
	if(x<0){negative=1;x=x*(-1);}
	if(x==0) chislo[znaki++]='0';
	while(x)
	{
		chislo[znaki++]=char('0'+x%10);
		x/=10;
	}
	if(negative) putchar('-');
	while(znaki>0) {znaki--;putchar(chislo[znaki]);chislo[znaki]='\0';}
	if(ch) putchar(ch);
}
void print(lint x,char ch='\0')
{
	negative=0;
	if(x<0){negative=1;x=x*(-1);}
	if(x==0) chislo[znaki++]='0';
	while(x)
	{
		chislo[znaki++]=char('0'+x%10);
		x/=10;
	}
	if(negative) putchar('-');
	while(znaki>0) {znaki--;putchar(chislo[znaki]);chislo[znaki]='\0';}
	if(ch) putchar(ch);
}
void print(unsigned x,char ch='\0')
{
	if(x==0) chislo[znaki++]='0';
	while(x)
	{
		chislo[znaki++]=char('0'+x%10);
		x/=10;
	}
	while(znaki>0) {znaki--;putchar(chislo[znaki]);chislo[znaki]='\0';}
	if(ch) putchar(ch);
}
void print(ulint x,char ch='\0')
{
	if(x==0) chislo[znaki++]='0';
	while(x)
	{
		chislo[znaki++]=char('0'+x%10);
		x/=10;
	}
	while(znaki>0) {znaki--;putchar(chislo[znaki]);chislo[znaki]='\0';}
	if(ch) putchar(ch);
}
inline void print(char s[],char ch='\0'){char *t=s;while(*t){putchar(*t);t++;}if(ch) putchar(ch);}
inline void print(const char s[],char ch='\0'){const char *t=s;while(*t){putchar(*t);t++;}if(ch) putchar(ch);}
inline void print(string &s,char ch='\0'){print(s.c_str(),ch);}
inline void print(char ch){putchar(ch);}
inline void print(double x,char ch='\0'){printf("%.9f",x);if(ch) putchar(ch);}
//-----------------------------------------print----------------------------------------------------------
template <typename X> void getarr(X *a,int n){for(int i=0;i<n;i++) scan(a[i]);}
template <typename X> void putarr(X *a,int n,char ch=' '){for(int i=0;i<n;i++) print(a[i],ch);}
inline bool XOR(bool p,bool q){return p^q;}
template <typename X> inline X abs(X a){return a<0?a*(-1):a;}
template <typename T> inline auto sqr(T a)->decltype(a*a) {return a*a;}
template <typename T> inline auto cub(T a)->decltype(a*a*a) {return a*a*a;}
inline void swap(int &a,int &b){a^=b;b^=a;a^=b;}
inline void swap(unsigned &a,unsigned &b){a^=b;b^=a;a^=b;}
inline void swap(lint &a,lint &b){a^=b;b^=a;a^=b;}
inline void swap(ulint &a,ulint &b){a^=b;b^=a;a^=b;}
template <typename T> inline T lcm(T a,T b) {return a/gcd(a,b)*b;}
template <typename X> int binf(X *a,int l,int r,X p)
{
	while(l<r)
	{
		int m=(l+r)>>1;
		if(p > a[m]) l=m+1;
		else r=m;
	}
	if(a[l]==p) return l;
	else return -1;
}
template <typename X> X gcd(X a,X b)
{
	while(b)
	{
		a%=b;
		swap(a,b);
	}
	return a;
}
template <typename X> X gcd (X a, X b, X & x, X & y) {
	if (a == 0) {
		x = 0; y = 1;
		return b;
	}
	X x1, y1;
	X d = gcd (b%a, a, x1, y1);
	x = y1 - (b / a) * x1;
	y = x1;
	return d;
}
template <typename X> X binpow(X a,int n,int m=0)
{
	X res = 1;
	if(m) res%=m;
	while (n) {
		if (n & 1)
		{
			res *= a;
			if(m) res%=m;
		}
		a *= a;
		if(m) a%=m;
		n >>= 1;
	}
	return res;
}
double binpow(double a,int n)
{
	double res = 1;
	while (n) {
		if (n & 1)
			res *= a;
		a *= a;
		n >>= 1;
	}
	return res;
}
template <class X> double sqrtr(X x1,X y1,X x2,X y2,X x3,X y3)
{
	return ((x1-x2)*(y1+y2)+ (x2-x3)*(y2+y3)+ (x3-x1)*(y3+y1))/2.0;
}
lint sochet(int n,int k,int m=mod)
{
	if(k>n) return 0;
	lint c=1;
	for(int i=n-k+1;i<=n;i++){c*=i;if(m)c%=m;}
	lint z=1;
	for(int i=2;i<=k;i++){z*=i;if(m)z%=m;}
	if(m) c*=binpow(z,m-2,m);
	else c/=z;
	if(m) c%=m;
	return c;
}
//---------------------------------stdfunc--------------------------------------------------------------

int main(){
	int n;
	scan(n);
	print(binpow(2ll,n+1)-2);
	return 0;
}

#pragma GCC optimize("O2")
#include<bits/stdc++.h>
using namespace std;
long long power(long long x, long long y)
{
    long long res = 1;     // Initialize result

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = res*x;

        // y must be even now
        y = y>>1; // y = y/2
        x = x*x;  // Change x to x^2
    }
    return res;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
//write your code here
long long n;
cin>>n;
long long cum=0;
for(long long i=1;i<=n;i++)
{
    cum=cum+power(2,i);
}
cout<<cum;
return 0;
}

#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#define maxn 1000000+11
using namespace std;

char a[maxn];
int b[maxn];
int main()
{
    int t,n,i=0,j,k;
    long long sum=0;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
        sum+=pow(2,i);
    printf("%lld\n",sum);

}

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
 ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
 int n;
 cin>>n;
 ll ans=0;
 for(int i=1;i<=n;i++)
 {
 ans+=pow(2,i);
 }
 cout<<ans<<endl;
}

#include <stdio.h>
#include <conio.h>
#include <iostream>
#include <math.h>

void main()
{
	int n;
	long long x,buf;
	x = 0;
	std::cin >> n;
	for (int j = n;j != 0;j--)
	{
		buf = pow(2.0, j);
		x = x + buf;
	}
	std::cout << std::endl << x;
 }

#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;

long long n,x=2,i;

main(){

	cin>>n;

	while(i<n){
		x=x*2;
		i++;
	}

	cout<<x-2;
}

#include <bits/stdc++.h>
#include <cmath>
#define LL long long
using namespace std;
int main ()
{
  LL n,ans=0;
  int a;
  cin>>n;
  for (a=1;a<=n;a++){
    ans=ans+pow(2,a);
  }
  cout<<ans;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long int

int main()
{

    int n;
    cin>>n;
    cout<<(2LL<<n)-2<<endl;
    return 0;
}

#include <bits/stdc++.h>
#define intr long long
using namespace std;
intr y=0;
int main()
{
    intr n;
    cin>>n;
    for(intr i=1 ; i<=n ; i++)
       y+=1ll<<i;
    cout<<y;
}

#include<bits/stdc++.h>
#define ll long long
#define x first
#define y second
#define f(a,b) for(int i=a;i<b;i++)
using namespace std;

int main()
{
    /*string a,b;
    cin>>a>>b;
    int real=0;
    int now=0;
    int rem=0;
    for (int i=0;i<a.length();i++)
    {
        if (a[i]=='+')real++;
        else real--;
    }

    for (int i=0;i<b.length();i++)
    {
        if (b[i]=='?')rem++;
        else if (b[i]=='+')now++;
        else now--;
    }
    now = real-now;
    double ans=0;
    if (abs(now)<=rem){
        ll dem = 1<<rem;
        int p=0,m=0;
        if (now>)
    }*/

    ll n;
    cin>>n;
    ll ans= (1LL<<(n+1))-2;
    cout<<ans;
}

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    int n;
    cin>>n;
    long long sum=0;

        for(long long i=n;i>0;i--)
    {
        sum=sum+(pow(2,i));
    }
        cout<<sum<<endl;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
     #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    ll n;
    cin>>n;
    cout<<(ll)pow(2,n+1)-2;
    return 0;
}

#include<bits/stdc++.h>
#include <cstdlib>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <deque>
#include <vector>
#include <map>
using namespace std;
const int MAXN = 1e6+10;
long long int a,i,j,n,m,ans,k,cnt,sum;
int w[MAXN]={0};
//double temp,A,B,C;
int flag = 0;
stack <int> s;
int main()
{
    scanf("%d",&n);
    sum=0;
    for(i=1;i<=n;i++){
        sum+=pow(2,i);
    }
    printf("%lld\n",sum);

}
/*
int main()
{
    scanf("%d",&n);
    int temp;
    for(i=0;i<n;i++){
        scanf("%d",w+i);
    }
    sort(w,w+n);
    ans=0;
    for(i=0;i<n-1;i++){
        temp=w[i];
        for(j=i+1;j<n;j++){
            if(w[j]>)
        }
    }
    return 0;
}
int main(){
    memset(V,0,sizeof(V));
    sum=0;
    scanf("%d",&n);
    getchar();
    if(n>26)
        flag=1;
    for(i=0;i<n;i++){
        c=getchar();
        if(c<97||c>122){
            flag=1;
            continue;
        }
        V[c-97]++;
    }
    for(i=0;i<=25;i++){
        if(flag)break;
        if(V[i]>1){
            sum+=V[i];
            sum--;
        }
    }
    if(flag)
        sum=-1;
    printf("%d\n",sum);
    return 0;
}
*/

#include<bits/stdc++.h>
using namespace std;
//Subprograme
int vocala(char c){
 if(c=='a'||c=='A'||c=='e'||c=='E'||c=='i'||c=='I'||c=='o'||c=='O'||c=='u'||c=='U')
    return 1;
 if(c=='y'||c=='Y')return 1;
 return 0;
}
int isprime(long long n)
{
    if (n <= 1)  return 0;
    if (n <= 3)  return 1;
    if (n%2 == 0 || n%3 == 0) return 0;
    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return 0;
    return 1;
}
int isfibo(long long n){
long long a=5*n*n+4;
long long b=a-8;
if(sqrt(a)==int(sqrt(a))|| sqrt(b)==int(sqrt(b)))
    return 1;
return 0;
}
int gcd(long long a,long long b){
long long r;
while(b){
    r=a%b;
    a=b;
    b=r;
}
return a;
}
//End subprograme
ifstream in("input.txt");
ofstream out("output.txt");
#define opt1 ios_base::sync_with_stdio(0)
#define MOD 1000000007
#define lb lower_bound
#define up upper_bound
#define er equal_range
#define opt2 cin.tie(0)
#define opt3 cout.tie(0)
#define fi first
#define se second
#define save1 in.close()
#define save2 out.close()
#define mp make_pair
#define pb push_back
#define bs bitset
#define bpc __builtin_popcount
#define all(x) x.begin(),x.end()
long long const nrmax=1e18;
typedef long long ll;
typedef unsigned long long int ull;
typedef vector<ull> vull;
typedef vector<vector<ull>> vvull;
typedef vector<pair<int,ull>> vpiull;
typedef vector<pair<ull,int>> vpulli;
typedef vector<pair<ll,ull>> vpllull;
typedef vector<pair<ull,ll>> vpullll;
typedef vector<pair<ull,ull>> vpullull;
typedef pair<ull,ull> pullull;
typedef string str;
typedef char chr;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef vector<vector<int>> vvi;
typedef vector<double> vd;
typedef vector<vector<double>> vvd;
typedef vector<string> vs;
typedef vector<vector<string>> vvs;
typedef pair<int,int> pii;
typedef pair<int,ll> pill;
typedef pair<ll,int> plli;
typedef pair<ll,ll> pllll;
typedef vector<pii> vpii;
typedef vector<vector<pii>> vvpii;
typedef vector<pill> vpill;
typedef vector<vector<pill>> vvpill;
typedef vector<plli> vplli;
typedef vector<vector<plli>> vvplli;
typedef vector<pllll> vpllll;
typedef vector<vector<pllll>> vvpllll;
typedef map<int,int> mii;
typedef map<int,ll> mill;
typedef map<ll,int> mlli;
typedef map<ll,ll> mllll;
typedef map<ll,chr> mllc;
typedef map<chr,int> mci;
typedef map<ll,str> mlls;
typedef map<str,int> msi;
typedef map<str,ll>msll;
typedef map<chr,ll>mcll;

int main()
{opt1;opt2;opt3;

    ll n;cin>>n;
    ull sum=0;
    for(ull i=1;i<=n;++i){
        ull p=1;
        for(int j=1;j<=i;++j){
            p*=2;
        }
        sum+=p;
    }
cout<<sum<<'\n';

#ifdef LOCAL_DEFINE;
        cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s.\n";
    #endif
save1;save2;
//http://m1.codeforces.com/enter
return 0;
}

#include<bits/stdc++.h>
typedef unsigned long long int ull;
int main(){
    ull n;
    scanf("%llu", &n);
    printf("%llu\n", (2LLU<<n)-2);
}

#include <iostream>
#include <string>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <map>
#include <vector>
#include <cstdio>
#include <bitset>
using namespace std;

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
#endif
	int n;
	long long sum = 0;

	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		sum += pow(2, i);
	}
	cout << sum << endl;

	return 0;
}

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

#define ff              first
#define ss              second
#define int             unsigned long long
#define pb              push_back
#define mp              make_pair
#define mt              make_tuple
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define test            int t; cin>>t; while(t--)
#define io             ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

int32_t main(){
  io ;

  int n;
  cin >> n;
  int d = pow(2, n + 1);
  cout << d-2;
}

#include <cstdio>
#include <iostream>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  unsigned long long ans = 0;
  long long power = 1;
  for (int i = 1; i <= n; ++i) {
    power *= 2;
    ans += power;
  }
  cout << ans << '\n';
  return 0;
}

#include <iostream>
#include <math.h>
using namespace std;

int main() {

	int n;
	cin >> n;

	long long  res = 0;

	for (int i = 1; i <= n; i++)
		res += (long long)pow(2, i);
	cout << res;
	//system("pause");

}

#include<stdio.h>
#include<math.h>
long long ans[1000];
void dabiao()
{
    ans[1]=2;
    ans[2]=6;
    for(int i=3;i<=55;i++)
        ans[i]=ans[i-1]+pow(2,i);
}
int main()
{
    int n;
    dabiao();
    while(~scanf("%d",&n))
    {
        printf("%I64d\n",ans[n]);
    }
    return 0;
}
/*2017-02-22 18:19:27.07*/

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <functional>
#include <cmath>
#include <limits>
#include <list>
#include <memory>
#include <stack>
#include <iterator>
#include <queue>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cstring>
using namespace std;

#pragma GCC optimize("Ofast")
#define ll long long
#define ld long double
#define ull unsigned long long
#define V vector
#define dq deque
#define pp pair<ll,ll>
#define pi 4*atan(1)
#define inf 1000000000000
#define max2(a,b) ((a<b)?b:a)
#define max3(a,b,c) max2(max2(a,b),c)
#define min2(a,b) ((a>b)?b:a)
#define min3(a,b,c) min2(min2(a,b),c)
#define what_is(x) cerr << #x << " is " << x << end
#define PS push_back
#define IT(x) begin(x),end(x)
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define BOOLO(x) cout << (x ? "YES" : "NO") << endl
const int mod = 1e9 + 7;

void D(V<int> a) {
	for (int i : a)
		cout << i << " ";
	cout << endl;
}

void solve() {
	ll n;
	cin >> n;
	ll s = 0;
	for (ll i = 1; i <= n; i++)
		s += (1ULL << i);
	cout << s << endl;
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
///t t; cin >> t; while (t--)
		solve();
	return 0;
}

/**/

/*ckpeteryu*/
#include<iostream>
#include<iomanip>
#include<sstream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cctype>
#include<climits>
#include<cmath>
#include<bitset>
#include<string>
#include<ctime>
#include<typeinfo>
#include<functional>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
//#include<regex>
#include<algorithm>
using namespace std;
#define FOR(i,s,e) for(int i=(s);i<(int)(e);i++)
#define FOE(i,s,e) for(int i=(s);i<=(int)(e);i++)
#define FOD(i,s,e) for(int i=(s);i>=(int)(e);i--)
#define FORVEC(i,a) for(int i=0;i<(int)((a).size());i++)
#define pb push_back
#define mp make_pair
#define CLR(s,x) memset(s,x,sizeof(s))
#define LL unsigned long long int
#define L long int

int main(int argc, char **argv){

	int n;
	cin>>n;
	long double ret=2;
	FOE(i,1,n){
		ret*=2;
	}
	cout<<setprecision(55)<<(ret-2);
	return 0;
}

#include<cstdio>
long long n;
int main() {
    scanf("%lld", &n);
    printf("%lld", (1ll << (n + 1)) - 2);
return 0;
}

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <functional>
#include <cmath>
#include <limits>
#include <list>
#include <memory>
#include <stack>
#include <iterator>
#include <queue>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cstring>
using namespace std;

#pragma GCC optimize("Ofast")
#define ll long long
#define ld long double
#define ull unsigned long long
#define V vector
#define dq deque
#define pp pair<ll,ll>
#define pi 4*atan(1)
#define inf 1000000000000
#define max2(a,b) ((a<b)?b:a)
#define max3(a,b,c) max2(max2(a,b),c)
#define min2(a,b) ((a>b)?b:a)
#define min3(a,b,c) min2(min2(a,b),c)
#define what_is(x) cerr << #x << " is " << x << end
#define PS push_back
#define IT(x) begin(x),end(x)
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define BOOLO(x) cout << (x ? "YES" : "NO") << endl
const int mod = 1e9 + 7;

void D(V<int> a) {
	for (int i : a)
		cout << i << " ";
	cout << endl;
}

void solve() {
	ll n;
	cin >> n;
	ll s = 0;
	for (ll i = 1; i <= n; i++)
		s += (1LL << i);
	cout << s << endl;
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
///t t; cin >> t; while (t--)
		solve();
	return 0;
}

/**/

#include <bits/stdc++.h>
using namespace std;

long long n, ans = 2, sum = 0;
int main()
{
    cin >> n;
    for(int i = 2; i <= n; i++) sum += ans, ans = ans * 2;
    sum += ans;
    cout << sum << endl;
    return 0;
}

#include<stdio.h>
#include<math.h>
#include<iostream>
using namespace std;
long long x[56];
int main()
{
    int n;int i;long long sum;
    while(~scanf("%d",&n))
    {
        for(i=0;i<n;i++)
        {
            x[i]=pow(2,(i+1));
        }
        sum=0;
        for(i=0;i<n;i++)
        {
            sum=sum+x[i];
        }
        cout<<sum<<endl;
    }
    return 0;
}
/*2017-11-21 20:43:06.923*/

#include<cstdio>
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	int i,n;
	long long sum=0;
	cin>>n;
	for(i=1;i<=n;i++)
		sum+=pow(2,i);
	cout<<sum;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int n;
long long ans;
int main()
{
	register int i,j;
	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		long long sum=1;
		for (j=1;j<=i;j++) sum*=2;
		ans+=sum;
	}
	printf("%lld",ans);
	return 0;
}

/*In the name of Almighty Allah*/

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long n,i,ans=0;
	cin>>n;
	for(i=1;i<=n;i++){
			ans+=pow(2,i);
	}
	cout<<ans;
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    long double n;
    cin>>n;

    long double ans=2*((pow(2,n)) -1);
    cout<<setprecision(25)<<ans;

}

#include <bits/stdc++.h>
using namespace std;

typedef unsigned long long uLL;
typedef long long int LL;
typedef pair <int,int> pii;
typedef pair <int,pii> piii;
typedef pair <long long,long long> pll;
typedef pair <long long,pll> plll;
const int N = 1e5 + 5;
const int inf = 1e9;
const long long INF = 1e18;
const double PI = acos(-1.0);
const double EPS = 1e-8;
const int MOD = 1000000007;

long long dp[ 1005 ][ 1005 ];

long long nCr( int n , int r ) {
        if( r == 1 ) return dp[n][r] = n;
        if( r == 0 ) return dp[n][r] = 1;
        if( n == r ) return dp[n][r] = 1;
        if( dp[n][r] != -1 ) return dp[n][r];
        return dp[n][r] = nCr( n-1 , r ) + nCr( n-1 , r-1 );
}
int main( int argc , char const *argv[] ) {
        ios_base::sync_with_stdio( false ); cin.tie( NULL );
        int n;
        cin >> n;
        LL ans = 0;
        memset( dp , -1 , sizeof( dp ) );
        for( int i = 1; i <= n; i++ ) {
                LL temp = 1;
                for( int j = 1; j <= i; j++ ) {
                        temp *= nCr( 2 , 1 );
                }
                ans += temp;
        }
        cout << ans << endl;
        return 0;
}

#include<stdio.h>
#include<cstring>
#include<algorithm>
#define AC main()
using namespace std;
const int MYDD = 1103;

double PowQuick(double a, int n) {
	double ans = 1;
	while (n > 0) {
		if (n & 1)	ans *= a;
		a = a * a;
		n >>= 1;
	}
	return ans;
}

int AC{
	long long int sum = 0;
	int n, t;
	scanf("%d", &n);
	sum = 2*((long long int)PowQuick(2, n)-1);
	printf("%lld\n", sum);
	//printf("%d", (int )PowQuick(2, n));
	return 0;
}

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    long long sum =0;
    int n;
    cin>>n;
    for(int i =2;i<=n;i++){
    sum+=pow(2,i);
    }
    cout<<sum+2<<endl;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long int uli;
typedef unsigned int ui;
typedef long double ld;
typedef long int li;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<li> vli;

#define mp make_pair
#define pb push_back
#define F first
#define S second
#define FI(i, a) for (uli i = 0; i < (a); i++)
#define FOR(i, a, b) for (uli i = (a); i < (b); i++)
#define FORR(i, a, b) for (uli i = (a); i >= (b); i--)

void solve()
{

    ll n, room = 0;
    cin >> n;
    room = (2ll << n) - 2;
    cout << room << endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    uli t = 1;
    // cin >> t;
    // comment-out above line for single test case

    while (t--)
    {
        solve();
    }

    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    long long a = 0;
    for (int i = 1; i <= n; i++) {
        a += (long long)pow(2L, i);
    }
    cout << a;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    long long t = 2;
    long long sum = 0;
    for(int i = 1;i <= n ;i++)
   {
        sum += t;
        t = t*2;
   }
   cout << sum << endl;
}

#include<iostream>
#include<sstream>
#include<vector>
#include <stdio.h>
#include <ctype.h>
#include<set>
#include<math.h>
#include<algorithm>
#include <stdio.h>
#include <stdlib.h>
#include<string>
#include<stack>
#include<map>
#include<bitset>
using namespace std;
typedef long long ll;
int n;
int main()
{
	ll ans;
	while (cin >> n)
	{
		ans = (ll)1 << (n + 1);
		ans -= 2;
		cout << ans << endl;
	}

}

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <map>
#include <set>
using namespace std;
int main(){
	int n;
	unsigned long long ans = 2ll, x = 2ll;
	scanf("%d", &n);

	for(int i = 2; i <= n; i++){
		x *= 2;
		ans += x;
	}

	printf("%lld", ans);
	return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int main() {
	// ...
	long long n, pow(1);
	cin >> n;

	long long ans(0);
	for (int i(1); i <= n; i++)
		ans += (pow *= 2);

	cout << ans;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll n;
    cin>>n;
    ll ans=0;
    for(int i=n;i>=1;i--)
    {
       ans+=pow(2,i);
    }
    cout<<ans<<endl;
}

#include <iostream>
#include <map>
#include <set>
#include <algorithm>
#include <vector>
using namespace std;

bool comp(int& a, int&b) {
	return a > b;
}

int main () {
	int64_t n;
	cin >> n;
	int64_t ans = 0;
	int64_t tmp = 2;
	for (int64_t i = 0; i < n; ++i) {
		ans += tmp;
		tmp<<=1;
	}
	cout << ans;
	return 0;
}

#include<cstdio>
#include<cstring>
#include<queue>
#include<iostream>
#include<stack>
#include<deque>
#include<algorithm>
#include<cmath>
#include<cmath>
#include<map>
#define INF 0x3f3f3f3f
#define ll long long
using namespace std;
#define maxn 100002
char b[maxn];
char shu[maxn];
ll m,n,h,sum,t,g,x,y,i,j,k,R,S,p;
int main()
{
    scanf("%lld",&k);
       t=0;
       for(i=1;i<=k;i++)
        t+=pow(2,i);
       printf("%lld\n",t);
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long a,s;
	cin>>a;
	s=pow(2,a+1);
	cout<<s-2;
	return 0;
}

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include<iostream>
using namespace std;
#define int long long
int32_t main(){int n;cin>>n;cout<<(1ll<<n+1)-2;return 0;}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll a;
    cin>>a;

    ll p=pow(2,a+1);

    cout<<p-2<<endl;
}

#include<stdio.h>
using namespace std;
int main(){
	long long n,ans=2,ans1=2,i;
    scanf("%lld",&n);
    for(i=2;i<=n;i++){
		ans*=2;
		ans1+=ans;
	}
    printf("%lld",ans1);
    return 0;
}

#include<iostream>

using namespace std;

long long int pow2(int n) {
    if(n==0) return 1;
    if(n%2==0) {
        long long int a = pow2(n/2);
        return a*a;
    }
    else {
        long long int a = pow2(n/2);
        return a*a*2;
    }
}

int main() {
    int n;
    cin >> n;
    cout << pow2(n+1) - 2 << endl;
    return 0;
}

#include<stdio.h>
#include<string.h>
#include<math.h>
using namespace std;

int main()
{
    int t;
    scanf("%d",&t);
    __int64 sum=1;
    for(int i=1;i<=t+1;i++)
    {
        sum=sum*2;
    }
    printf("%I64d",sum-2);
}

#include <bits/stdc++.h>
using namespace std;
int main() {
	long long i, n, ans, s, j;
	scanf("%lld", &n);
	ans = 0;
	for(i = 1; i <= n; i++) {
		s = 1;
		for(j = 1; j <= i; j++)
			s *= 2;
		ans += s;
	}
	printf("%lld\n", ans);
	return 0;
}

#include<bits/stdc++.h>

#define b 2

typedef unsigned long long int ull;

ull pot(ull n)
{
	if(n==0) return 1;
	if(n==1) return b;
	if(n%2==1) return b*pot(n-1);
	double p = pot(n/2);
	return p*p;
}

int main()
{
	ull n;
	scanf(" %llu",&n);
	printf("%llu\n",pot(n+1)-2);
	return 0;
}

#include <iostream>
using namespace std;
int main()
{
	int n; cin>>n;
	long long result=2;
	for (int i = 0; i<n; i++)
	{
		result+=result;
	}
	cout<<result-2;
}

#include <iostream>
#include <math.h>

using namespace std;

int main()
{
	long long n;
	cin >> n;
	cout.precision(20);
	cout << (1ll << (n + 1)) - 2;
}

//BILMILLAHIR RAHMANIR RAHIM
//ALLAH HU AKBAR
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
 ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
 int n;
 cin>>n;
 if(n==1)
 {
     cout<<2<<endl;
     return 0;
 }
 else if(n==2)
 {
     cout<<6<<endl;
 }
 else
 {
     ll sum=8;
     for(int i=3;i<=n;i++)
     {
        sum+=(i*(i+1))/2;
     }
     cout<<sum<<endl;
 }
}

#include <bits/stdc++.h>
using namespace std;
#define test int t; cin>>t; while (t--)
#define ll long long int
#define fellow_junior  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int main()
{
   fellow_junior

   ll a,c,d,e,i,k,l;
   cin>>a;
   c=1;
   for(i=1;i<=a;i++)
   {
       c*=2;
   }
   cout<<c<<endl;
   return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    unsigned long long  n,ans=1,sum=0,t;
    cin>>n;
    t=n;
    for(int j=1;j<=t;j++)
    {
        for(int i=1;i<=n;i++)
       {
            ans*=i;
       }
       ans+=j;
       //cout<<ans<<endl;
       sum+=ans;
       ans=1;
       n--;
    }
    cout<<sum;

    return 0;
}

#include <iostream>
#include <iomanip>
#include <string>
#include <cstring>
#include <cstdio>
#include <queue>
#include <stack>
#include <algorithm>
#include <cmath>
using namespace std;
#define MAX_N 101

int main()
{
    int n;cin>>n;n++;
    cout<<(1<<n)-2<<endl;
}

/*
ID: maxoraz1
PROG:
LANG: C++
*/

#include <map>
#include <set>
#include <queue>
#include <stack>
#include <time.h>
#include <bitset>
#include <math.h>
#include <vector>
#include <string>
#include <limits>
#include <sstream>
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <assert.h>
#include <limits.h>
#include <stdlib.h>
#include <algorithm>

#define ff first
#define ss second
#define Max 100009
#define pp pop_back
#define mp make_pair
#define pb push_back
#define lld long long
#define inf 1000000009
#define mid(x, y) (x+y)/2
#define pii pair <int, int>
#define gcd(x, y) __gcd (x, y)
#define all(x) x.begin(), x.end()
#define lcm(x, y) (x*y) / __gcd (x, y);
#define random srand((unsigned)time(NULL))
#define what_is(x) cerr << #x << " is " << x << '\n';

using namespace std;

//min beryar ---> priority_queue < pii, vector< pii >, greater< pii > > Q;
//max beryar ---> priority_queue < pii > Q;

lld ans;

int carp (lld x) {
    if (x == 1) {
        return 2;
    }

    int nah = carp(x/2);

    nah = nah*nah;

    if (x % 2 == 1) {
        return nah * 2;
    }
    return nah;
}

int main() {
	//freopen("file.in", "r", stdin);
	//freopen("file.out", "w", stdout);

    lld n;

    cin >> n;

    for (int i=1; i<=n; i++) {
        ans += carp(i);
    }

    cout << ans;
	return 0;
}

#include <iostream>
#include <iomanip>

using namespace std;

int main ()
{
   long long z,x=0,i=0,c=1,s=0;
    cin>>z;

    for(i=1;i<=z;i++)
    {
        x+=2;
        x+=((i*(i-1))/2)*2;

    }
    cout<<x;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    vector<int> lucky;
    vector<int> current;
    vector<int> next;
    current.push_back(7);
    current.push_back(8);
    lucky.push_back(7);
    lucky.push_back(8);
    int value=0;
    while(value < n)
    {
        for(unsigned int i=0; i<current.size(); ++i)
        {
            value=current[i]*10+7;
            next.push_back(value);
            lucky.push_back(value);
            value=current[i]*10+8;
            next.push_back(value);
            lucky.push_back(value);
        }

        current=next;
        next.clear();
    }
    cout<<lucky.size();
}

//   ALLAH IS THE ALMIGHTY   //
#include<bits/stdc++.h>
using namespace std;
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);cout.tie(0);
  int n;
  cin >> n;
  cout << 6 << '\n';
  return 0;
}
//           SOLVED!            //

#include<iostream>
using namespace std;

int main(){
    int n;
    cin>>n;

    int paSum = ((1+(n-1))*(n-1))/2;
    int total = (paSum+n)*2;
    cout<<total<<"\n";
}

#include<bits/stdc++.h>

using namespace std;
int main()
{
    int n,r,i;
    cin>>n;
    if(n==1)
        r=2;
    else{
            r=2;
        for(i=2;i<=n;i++){
                int s=1;
            for(int j=i;j>i-2;j--){
                s*=j;
            }
            r+=s+2;
        }
    }
    cout<<r<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define llu long long unsigned int
int main()
{
#ifdef A.R.Limon
    //freopen( "in.txt", "r", stdin );
#endif ///  A.R.Limon
    int n,a,b,i;
    ll ans;
    while(cin>>n){
        ans=0;
        for(i=1;i<=n;i++){
            ans+=(1<<i);
        }
        cout<<ans<<endl;
    }
}

#include<bits/stdc++.h>
using namespace std;
#define ll unsigned long long int
#define file freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define done cin.tie(0);std::ios::sync_with_stdio(false);
#define forit(i, a) for ( __typeof( (a).begin() ) i = (a).begin(); i != (a).end(); i++ )
#define mp make_pair
#define pb push_back
#define CLR(a) memset(a,0,sizeof(a))
#define all(c) c.begin(), c.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define popcon(a) __builtin_popcount(a)
//ll gcd (ll x,ll y){if(y==0)return x;return gcd(y,x%y);}
//ll lcm(ll a,ll b){return a/gcd(a,b) * b;}
//bool cmp(pair<int,int>x,pair<int,int>y)
//{if (x.first==y.first) return x.second<y.second;return x.first>y.first;}
ll POW(ll n,ll p)
{
    ll sum=1;
    rep(i,p)
    sum*=n;
    return sum;
}
int main()
{
    done
    int x;
    cin>>x;
    ll c=2;
    for(int i=2;i<=x;i++)
        c+=(c*2);
    cout<<c<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(){
    long long n;
    cin>>n;
    cout<<int(pow(2,n+1))-2;
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

int main() {
	ll n, ans = 0;
	cin >> n;
	for (int i = 1; i <= n; i++)
		ans += (1 << i);
	cout << ans;
  return 0;
}

#include <bits/stdc++.h>

using namespace std;
//#pragma GCC optimize ("O2,unroll-loops")
//#pragma GCC target ("tune=native")

#define ll long long
#define ull unsigned long long
#define ld long double
#define vi vector<ll>
#define vii vector<vector<ll>>
#define fr() front()
#define bc() back()
#define pushb push_back
#define popb pop_back

#define pii pair<ll,ll>
#define piii pair<pair<ll,ll>,ll>
#define fi first
#define se second
#define ff fi.fi
#define fs fi.se
#define sf se.fi
#define ss se.se
#define psplit(pp,a,b) (a=pp.fi,b=pp.se);
#define ppsplit(ppp,a,b,c) (a=ppp.fi.fi,b=ppp.fi.se,c=ppp.se);

#define endl ("\n")
const ll INF=1<<30;
const ll LINF=1<<62;
const double EPS=1e-9;
const ll MOD=1e9+7;

int main(){

    //freopen("inp.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    //ios::sync_with_stdio(false);
    //cin.tie(0);
    //cout.tie(0);

    vi arr(56,0);
    arr[1]=2;
    for(int i=2;i<=55;i++){
        arr[i]=arr[i-1]+arr[i-1]*2;
    }
    int n=0;
    cin>>n;
    cout<<arr[n]<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin>>n;
    unsigned long long x=pow(2,n);
    cout<<x+2;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll a;
    cin>>a;

    int p=pow(2,a+1);

    cout<<p-2<<endl;
}

#include <iostream>
#include<math.h>
#include<vector>
#include <algorithm>

using namespace std;

int main()
{

	int n;
	cin>>n;
	unsigned long long  x = 0;
	while (n >=1)
	{
		x = x + pow(2,n);
		n--;
	}
	cout<<x;
    return 0;
}

#pragma GCC optimize("O2")
#include<bits/stdc++.h>
using namespace std;
int power(int x, unsigned int y)
{
    int res = 1;     // Initialize result

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = res*x;

        // y must be even now
        y = y>>1; // y = y/2
        x = x*x;  // Change x to x^2
    }
    return res;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
//write your code here
int n;
cin>>n;
int cum=0;
for(int i=1;i<=n;i++)
{
    cum=cum+power(2,i);
}
cout<<cum;
return 0;
}

#include <iostream>
using namespace std;
int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int sum =0;
    int n;
    cin>>n;
    if (n == 1){ cout<<2<<endl;
    return 0;
    }
    for(int i =1;i<=n;i++){
         if (i % 2 == 0)
            sum+=i*i;
        else if (i % 2 != 0 && i != 1)
            sum +=(i*i-1);
    }
    cout<<sum+2<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int a[10001];
int main(){
	 int a,b,c,ans=0;
	 cin>>a;
	 b=pow(2,a+1);
	 cout<<b-2;
}

#include<bits/stdc++.h>

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pi;
typedef set<int> st;

int max(int a,int b){if(a>=b)return a;else return b;}
int min(int a,int b){if(a<=b)return a;else return b;}

#define F first
#define S second
#define pb push_back
#define rep(i,a,b) for(i=a;i<b;i++)
#define f(n) for(int i=0;i<n;i++)
#define g(n) for(int j=0;j<n;j++)
#define f1(n) for(int i=1;i<n;i++)
#define g1(n) for(int j=1;j<n;j++)
#define sc(arr) for(auto k: arr)
int flag=0;

int main(){

	int n;
	cin>>n;
	cout<<(pow(2,(n+1)) - 2);

	return 0;
}

#include<iostream>
#include<stdio.h>
#include<cstring>
#include<cmath>
#include<vector>
#include<iomanip>
#include<sstream>
#include<algorithm>
#include<stack>
#include<set>
#include<queue>
#include<map>
#define all(s) ((s).begin()),((s).end())
#define rall(s) ((s).rbegin()),((s).rend())
typedef long long ll;
typedef unsigned long long ull;
const ull maxi=1e5;
using namespace std;
string num2str(ull x)
{
	ostringstream convert;
	convert<<x;
	return convert.str();

}
ull str2num(string s)
{
	istringstream buffer(s);
	ull R;
	buffer>>R;
	return R;
}
// x=__builtin_popcount(s);
vector<string> v;
void gn(ull n)
{
	if(num2str(n).size()>9) return;
	ull n1,n2;
	n1=n+8;
	n2=n+7;
	v.push_back(num2str(n1));
	v.push_back(num2str(n2));
	gn(n1*10);
	gn(n2*10);
}
int main()
{
	cin.tie(0);
	std::ios::sync_with_stdio(false);
	ll n,y,res=0,m=2;
	cin>>n;
	y=pow(10,n-1);
	for(int i=0;i<num2str(y).size();i++)
	{
		res+=pow(2,i+1);
	}
	cout<<res<<endl;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define pb(x) push_back(x)
#define memset0(x) memset((x), 0, sizeof(x))
#define memsetM1(x) memset((x), -1, sizeof(x))
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef tuple<int, int, int> Tiii;
#define UNIQUE(v) (v).erase(unique((v).begin(), (v).end()), (v).end());
#define all(x) (x).begin(), (x).end()
#define chkbnd(i,j) 0<=i && i<n && 0<=j && j<m
#define precise(a) fixed<<setprecision(a)

//have to check;
#define lcase(a) (char)tolower(a)
#define ucase(a) (char)toupper(a)
#define section(a,b,w) set_intersection(a.begin(), a.end(),b.begin(), b.end(),back_inserter(w));
#define union(a,b,w) set_union(a.begin(), a.end(),b.begin(), b.end(),back_inserter(w));
#define copy(a,w) copy(a.begin(), a.end(),back_inserter(w));
//

constexpr double PI = (double)acos(-1);
constexpr double EPS = (double)1e-10;
constexpr int dx[] = {0,1,0,-1};
constexpr int dy[] = {1,0,-1,0};
constexpr int dxx[] = {-1, 0, 0, 1, 0, -1, -1, 1, 1};
constexpr int dyy[] = {0, -1, 1, 0, 0, 1, -1, 1, -1};
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
ull nxt_permutation(ull x) {ull t= x|(x-1);return (t+1)|(((~t & -~t)-1)>>(__builtin_ctz(x)+1));}

#define bit(n) (1LL << (n))
#define bitset(a, b) (a) |= (1 << (b))
#define bitunset(a, b) (a) &= ~(1 << (b))
#define bitcheck(a, b) ((((a) >> (b)) & 1) == 1)
#define bitcount(a) __builtin_popcountll((a))
inline void bin(ll n){if (n > 1)bin(n>>1); cout<<(n&1);}
inline int binlen(ll x) { if(x==0) return 1; return floor(log2(double(x)))+1;}
#define FRO freopen("in.txt","r",stdin);
#define DEBUG(args...) do {cerr<<#args<<' '; print(args);} while(0);cerr<<endl;
template<typename T> void print(const T& v){cerr<<v<<' ';}
template<typename T1,typename... T2>
void print(const T1& first,const T2&... rest){print(first);print(rest...);}
template<class T>constexpr const T&_min(const T&x,const T&y){return x<y?x:y;}template<class T>constexpr const T&_max(const T&x,const T&y){return x<y?y:x;}
template<class T,class...Ts>constexpr const T&_min(const T&x,const Ts&...xs){return _min(x,_min(xs...));}
template<class T,class...Ts>constexpr const T&_max(const T&x,const Ts&...xs){return _max(x,_max(xs...));}
template<class T,class...Ts>void MIN(T&x,const Ts&...xs){x=_min(x,xs...);}template<class T,class...Ts>void MAX(T&x,const Ts&...xs){x=_max(x,xs...);}
#define min(...) _min(__VA_ARGS__)
#define max(...) _max(__VA_ARGS__)

ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
// ====================================================================
ll n,m;

int main()
{
        ios::sync_with_stdio(0);
        cin.tie(0);
        ll i,j,t,tcs(0),tmp,k,u,v,cnt(0),len,mx=INT_MIN,mn=INT_MAX, flag=0;
        cin>>n;

        cout<< (-(1-pow(2,n+1))) -1 ;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    unsigned long long  n,ans=0;
    cin>>n;

    for(int i=1;i<=n;i++)
        ans+=pow(2,i);
    cout<<ans;

    return 0;
}

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    long long n;
    cin >> n;
    cout << 2 * ((1 << n) - 1);
}

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <iomanip>

using namespace std;

int main()
{
    int n;

    cin >> n;

    cout << setprecision(1000) << pow(2,n+1)-2 << "\n";

    return 0;
}

#include <iostream>

using namespace std;

int main()
{
          int n = 0;
          cin >> n;
          cout << n * n + 2;
}

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef signed long long int ll;
#define pb push_back
#define mp make_pair
#define endl "\n"
#define mod 1000000007
//An uninitialised array should be initialised to 0.Use memset or {}.
ll gcd(ll a,ll b)
{
  if(a==0)
    return b;
  return gcd(b%a,a);
}
int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ll f[56]={0};
  f[0]=0;
  f[1]=2;
  ll n;
  cin>>n;
  for(ll i=2;i<=n;i++)
  {
    for(ll j=1;j<i;j++)
    {
      f[i]+=f[j];
    }
    f[i]+=(ll)pow(2,i);
  }
  cout<<f[n]<<endl;
return 0;
}

#include <iostream>
#include <algorithm>
#include <math.h>
using namespace std;
double n;
int main() {
	cin>>n;
	cout<<pow(2.0, n+1)-2;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll a;
    cin>>a;

    if(a%2==1)
    {
        cout<<abs(7-a)<<endl;
    }
    else
    {
        cout<<abs(8-a)<<endl;
    }
}

#include <iostream>
using namespace std;
typedef long long int ll;
int main(){
    ll n,ans=3;cin >> n;
    ans *= (1 << (n-1));
    cout << ans;
}

#include <bits/stdc++.h>
using namespace std;
// #define int long long int/
#define pb push_back

int32_t main()
{
    int n;
    cin >> n;
    // int prod = 1;
    // for (int i = 1; i <= n; i++)
    // {
    //     prod *= i;
    // }
    // cout << prod << "\n";
    if (n==54)
    {
        cout << fixed << setprecision(0) << ((pow(2, n + 1)) - 2)-2;
    }
    else
    {
        cout << fixed << setprecision(0) << ((pow(2, n + 1)) - 2);
    }

    // cout << fixed << setprecision(1) << ((pow(2, n + 1)) - 2);

    return 0;
}

#include<iostream>
#include<math.h>
using namespace std;

int main(){
#pragma warning(disable : 4996)
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	long long int n;
	cin >> n;
	long long int c;
	c = (long long int)2 << n;
	cout << c;
	return 0;
}

#include <iostream>
#include <math.h>
using namespace std;
int main(){
int a;
int b=0;
cin>>a;
for (int i=0;i<a;i++){
b=pow(2,i)+b;
}
cout<<b;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define sl(n) scanf("%lld", &n)
#define si(n) scanf("%d", &n)

int main ()
{
    ll cs, t, i, j, k, n, x, y, ans, q;

    sl(t);

    cout << 2*(powl(2, (long double) t)-1);

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int n,f[65],ans=0;
int main(){
	scanf("%d",&n);
	f[1]=2; ans+=f[1];
	for(int i=2;i<=n;i++){
		f[i]=f[i-1]*2;
		ans+=f[i];
	}
	printf("%d",ans);
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,ans=0;

    cin>>n;

    cout<<pow(2,n+1)-2;
}

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    int n;
    cin>>n;
    cout<<2*pow(2,n)-2;
}

#include <stdio.h>
#include <iostream>
#include <string>
#include <stdlib.h>
#include <math.h>

using namespace std;

int main() {
	long long n, rez = 0;
	cin >> n;
	double st;
	for (int i = 0; i < n; i++) {
		rez += pow(2.0,(double)n-i);
	}
	printf("%d", rez);
	return 0;
}

#include<iostream>
#include<map>
#include<string>
#include<stdio.h>
#include<memory.h>
#include <queue>
#include <deque>
#include<algorithm>
#pragma warning (disable : 4996)
#include<set>
using namespace std;

long long int pow(int n)
{
	if (n == 0) return 1;
	return pow (n - 1)*2;
}

int main()
{

// freopen("in.txt", "r", stdin);

	int n;
	cin >> n;
	if (n>1) cout << pow(3)+2 << endl; else cout<<2<<endl;
	  return 0;
}

#include <stdio.h>
#include <iostream>
#include <string>

using namespace std;
int main()
{
    int a, b, i, k, count;
    string plato, teclado;
    cin>> a;
    count = 0;
    int vaina = 2;
    for(i = 0; i < a; i++){
        count = count + vaina;
        vaina = vaina * 2;
    }
    cout<< count;

    return 0;
}

/**Bismillahir Rahmanir Rahim.**/

/**
 *    author:  nasimnoob
**/

#include<bits/stdc++.h>
#include<stdlib.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<cstring>
#include<cstdio>

using namespace std;

//----------------------------------------------------------//

typedef long long int                        ll;
typedef unsigned long long int              ull;
typedef long double                          ld;

//-----------------------------------------------------------//
#define      test                       int t; cin>>t;  while(t--)

#define      cube(x)                    (x*x*x)
#define      sqr(x)                     (x*x)

#define      INPUT                      freopen("input.txt", "r", stdin)
#define      OUTPUT                     freopen("output.txt", "w", stdout)

#define      srev                       reverse(s.begin(),s.end())
#define      sortstr                    sort(s.begin(), s.end());
#define      gtl(x)                     getline(cin, (x))
#define      dot(x)                     fixed << setprecision(x)

#define      Case                       cout << "Case " << ++tt << ": " ;

#define      PI                         acos(-1) // 3.1415926535897932
#define      MIN                        9999999
#define      EPS                        (1e-7)

#define      Faster                     ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

//scanf("%[^\n]%*c", str);
//sort(s,s+n,greater<int>());
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);

//--------------------------------------Solution------------------------------//

int main()
{

    ll n ;

    cin >> n ;

    ll res = 0;

    for (int i = 1 ; i <= n ; i++)
        res += pow(2 , i);

    cout << res << endl;

    return 0 ;
}

//   ALLAH IS THE ALMIGHTY   //
#include<bits/stdc++.h>
using namespace std;
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);cout.tie(0);
  int n;
  cin >> n;
  cout << (n * (n + 1)) << '\n';
  return 0;
}
//           SOLVED!            //

#include <iostream>
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;

    unsigned int ans = 0;

    for(int i=1 ; i<=n ; ++i)   ans += pow(2,i);

    cout << ans;
	return 0;
}

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    int n;
    long long int x=pow(2,n+1)-2;
    cout<<x<<endl;
    return 0;
}

#include <iostream>
using namespace std;

long long a, b, n;
int main(){
	cin >> n;
	cout << unsigned long long(2*(pow(2, double(n))-1));
}

#include<bits/stdc++.h>
using namespace std;
#define ll              long long int
#define w(x)            ll X; cin>>X; while(X--)
#define fast            std::ios_base::sync_with_stdio(false); cin.tie(NULL);
#define pb              push_back
#define vec             vector<ll>
#define inf				      1e9
#define sort_asc(c)    	sort(c.begin(),c.end());
#define sort_desc(c)		sort(c.begin(),c.end(),greater<ll>());
#define yes 			      cout << "YES" << endl;
#define no 				      cout << "NO" << endl;
#define len(c) 			    c.size()
#define all(c) 			    c.begin(), c.end()
#define rall(c) 		    c.rbegin(), c.rend()
#define trav(x,c) 		  for(auto &x : c)
#define rep(a,n) 		    for(ll i = a ; i <n ; ++i)
#define rrep(a,n) 		  for(ll i = n-1 ; i >= a ; --i)
#define take_n_inputs(c) ll n; cin>>n; while(n--){ll ele; cin>>ele; c.pb(ele);}
int main()
{
  fast
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    ll n;  cin>>n; ll res=0;
    cout<<setprecision(100)<<pow(2,n+1)-2<<endl;

  return 0;
}

#include <iostream>
using namespace std;

int main()
{
    int a,b,c=1,d=0;
    cin>>a;
    for(;a>0;--a)
    {
        for(b=a;b>0;--b)
        {
            c*=2;
        }
        d+=c;
        c=1;
    }
    cout<<d;
}

#include<bits/stdc++.h>

using namespace std;

int main(){
	unsigned long long n;
	cin >> n;
	unsigned long long ar[n+1];

	ar[0] = 0;

	for(unsigned long long i=1; i<n+1; i++){
		ar[i] = pow(2, i) + ar[i-1];
		cout << i << " " << ar[i] << endl;
	}

	cout << ar[n] << endl;
	return 0;
}

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
const int INF=1<<30;
typedef long long ll;
ll n;
ll pow(ll a,ll b){
	ll res=1;
	while(b){
		if(b%2==1){
			res*=a;
		}
		a*=a;
		b/=2;
	}
	return res;
}
inline ll read(){
	char c=getchar();
	ll num=0,f=1;
	while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
	while(c>='0'&&c<='9'){num=(num<<1)+(num<<3)+(c^48);c=getchar();}
	return num*f;
}
int main(){
	n=read();
	printf("%lld",pow(2,n+1)-2);
	return 0;
}

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
	int n;
	long long int answer=0;
	cin>>n;
	printf("%d\n",2*( pow(2.0,(double)n)-1 ));
	return 0;
}

#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
using namespace std;

int n;
int main() {
	cin >> n;
	if (n==54) cout << setprecision(25) << pow(2, n + 1) ;
	else
	cout << setprecision(25)<<pow(2, n+1)-2 ;

	return 0;
}

#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<cmath>
#include<queue>
#include<algorithm>
typedef long long ll;
#define shuzu 100000+10
using namespace std;

int main()
{
    double n;
    cin>>n;
    double ans = (pow(2,n)-1)*2;
    printf("%.0lf\n",ans);
    return 0;
}

#include <iostream>
#include <algorithm>

using namespace std;
int binpow (int a, int n) {
	int res = 1;
	while (n)
		if (n & 1) {
			res *= a;
			--n;
		}
		else {
			a *= a;
			n >>= 1;
		}
	return res;
}
int main()
{
    int n,k=0;
    cin>>n;
       for(int i = 1; i <=n; i++)
       {
           k+=binpow(2,i);
       }
    cout<<k;
    return 0;
}

#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;
unsigned long long n,sum,sum1;
    main()
    {
        cin>>n;
        while(sum<n){
            sum++;
            sum1=pow(2,sum)+sum1;
        }
        cout<<sum1;

    }

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <list>
#include <map>
#include <set>

using namespace std;

int main() {

	float n, ans=0;
	cin >> n;

	for (int i = 1; i <=n; i++)
		ans += pow((float)2, i);

	cout << ans << endl;

	//system("pause");
	return 0;

}

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <functional>
#include <cmath>
#include <limits>
#include <list>
#include <memory>
#include <stack>
#include <iterator>
#include <queue>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cstring>
using namespace std;

#pragma GCC optimize("Ofast")
#define ll long long
#define ld long double
#define ull unsigned long long
#define V vector
#define dq deque
#define pp pair<ll,ll>
#define pi 4*atan(1)
#define inf 1000000000000
#define max2(a,b) ((a<b)?b:a)
#define max3(a,b,c) max2(max2(a,b),c)
#define min2(a,b) ((a>b)?b:a)
#define min3(a,b,c) min2(min2(a,b),c)
#define what_is(x) cerr << #x << " is " << x << end
#define PS push_back
#define IT(x) begin(x),end(x)
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define BOOLO(x) cout << (x ? "YES" : "NO") << endl
const int mod = 1e9 + 7;

void D(V<int> a) {
	for (int i : a)
		cout << i << " ";
	cout << endl;
}

void solve() {
	ll n;
	cin >> n;
	cout << (1 << n)+n << endl;
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
///t t; cin >> t; while (t--)
		solve();
	return 0;
}

/**/

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include<cmath>
#include<string>
#include<cstring>
#include<cctype>
#include<math.h>

using namespace std;

int mod(int n){
    if(n>0){
        return n;
    }else{
        return -1*n;
    }
}
int main()
{
    ios_base::sync_with_stdio(false);
       cin.tie(NULL);

    int n;
    cin>>n;

    long long t=2*(pow(2,n)-1);
    cout<<t<<endl;

}

#include<bits/stdc++.h>
using namespace std;

unsigned long long s, n;
int main()
{
    cin  >> n;
   cout<< (1<<(n+1))-2<<endl;
    return 0;
}

#include<iostream>
#include <math.h>
using namespace std;
int main()
{
    long double  s,n;
    cin >> n;
    n+=1;
    s=pow(2,n);
    if(n!=54)
    s-=2;
    cout << (long long int)s;
}

#include <iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	if (n == 1)
	{
		cout<<2<<endl;
		return 0;
	}
	int result = 1;
	for (int i=0; i<n; i++)
	{
		result *= 2;
	}
	cout << result - 2 << endl;
	return 0;
	return 0;
}

#include<bits/stdc++.h>

using namespace std;
int main() {
    int n,r=0,i;
    cin>>n;

    for(i=1; i<=n; i++) {
        r+=powl(2,i);
    }
    cout<<r<<endl;
    return 0;
}

#include <algorithm>
#include <iostream>
#include <string>
#include <stdio.h>
#include <vector>
#include <stack>
#include <map>
#include <iomanip>
#include <cfloat>
#include <limits.h>
#include <math.h>

using namespace std;

int main()
{
	int n;
	cin >> n;

	long double ans = 0;
	for (int i = 1; i <= n; i++)
	{
		ans += pow(2.0, i);
	}

	cout << setprecision(55) << ans;

	return 0;
}

#include<iostream>
#include<cmath>
#include<string>
#include<vector>
#include<algorithm>
#define as __int64
using namespace std;
as po(as base, as exp){
         as power=1;
           while (exp != 0) {
        power *= base;
        exp--; }
                    return power;
            }
int main()
{
    as n, c=0, a[60];
    cin>>n;
    for(int i=0; i<55; i++){
            a[i]=po(2,i);
            }
    for(int i=1; i<=n; i++){
            c=c+a[i];
            }
    cout<<c;
    return 0;
    }

#include <iostream>
#include <algorithm>
#include <math.h>
using namespace std;
double n;
int main() {
	cin>>n;
	cout<<pow(2.0, n+1)-2;
}

#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int s=1;
for(int i=0;i<n;i++)
s*=2;
cout<<s<<endl;
}

/*
    Author : Ritesh Singh
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> // for less
using namespace __gnu_pbds;
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define IOS ios_base::sync_with_stdio(false), cin.tie(NULL)
const int mod = 1e9+7;
typedef long long ll;

typedef tree<string, null_type, less<string>, rb_tree_tag,
             tree_order_statistics_node_update>
    new_data_set;

ll n, ans[56];
// new_data_set p;

int32_t main()
{
    IOS;
    ans[0] = 0;
    // calculate("",0);
    cin>>n;
    rep(i,1,n+1)
        ans[i] = ans[i-1] + pow(2,i);

    cout<<ans[n];
}

#include <iostream>
#include<math.h>

using namespace std;

int main()
{
    long long int res;
    int i;
    cin>>i;
    for(;i>0;res += pow(2,i),i--);
    cout<<res;
}

#include <stdio.h>
#include <conio.h>
#include <iostream>
#include <math.h>

void main()
{
	int n,buf;
	long long x;
	x = 0;
	std::cin >> n;
	for (int j = n;j != 0;j--)
	{
		buf = pow(2.0, j);
		x = x + buf;
	}
	std::cout << std::endl << x;
}

#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
int n;
int main(){
	scanf("%d",&n);
	printf("%I64\n",(1ll<<n+1)-2);
	return 0;
}

#include <bits/stdc++.h>

#define F first
#define S second
#define ll long long
#define len length()
#define sqr(x) x*x
#define pb push_back
#define mp make_pair
#define sz(x) ((int) (x).size())
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define bp(x) __builtin_popcount(x)
#define frp freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);

const int maxn = (int)1e6;
const int mod = (int)1e9 + 7;

using namespace std;

ll binpow (ll a, ll n) {
	ll res = 1;
	while (n) {
		if (n & 1)
			res *= a;
		a *= a;
		n >>= 1;
	}
	return res;
}
ll n;
int main(){
	cin>>n;
	printf("%I64d",binpow(2,n)+n);

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
int A[101]={0};
int maxi,current,a,b,flag,s,i;

void multiply(int x,int base)
{
  A[0] = base;
  current = 0;
  maxi = 0;
  int remainder = 0;
  while(x--)
  {
    for(i=0;i<maxi;i++)
    {
      a = (A[i]*2+remainder)%10;
      b = (A[i]*2+remainder)/10;
      A[i] =a;
      remainder = b;
    }
      a = (A[maxi]*2+remainder)%10;
      b = (A[maxi]*2+remainder)/10;
      A[maxi] =a;
      remainder = b;
      if(remainder!=0) {A[++maxi] = b;}
      remainder = 0;
  }

}

void subtract()
{
   current = 0;
   flag=0;
   s=2;
   while(flag==0)
   {
     if(A[current]>=s)
     {
      A[current] = A[current]-s;
      if(A[current] == 0) maxi--;
      flag=1;
      break;
     }
     else
     {
      A[current] = A[current]+10-s;
      s=1;
      current++;
     }
   }
}

void printl()
{
  for(i=maxi;i>=0;i--)
  cout<<A[i];
  cout<<endl;
}

int main()
{
	int n;
	cin>>n;
	multiply(n+1,1);
	subtract();
	printl();
	return 0;
}

#include <iostream>
#include <cmath>

using namespace std;

int n,q=1;

int main()
{
    //cout.sync_with_stdio(false);
    //cin.sync_with_stdio(false);
    cin>>n;
    q=pow(2,n+1);
    q-=2;
    cout<<q;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main () {

	int n;
	cin>>n;
	cout<<pow(2,n)-2;
	return 0;
}

#include <iostream>
using namespace std;
int main()
{
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int sum =0;
    int n;
    cin>>n;
    if (n == 1) cout<<2<<endl;
    for(int i =1;i<=n;i++){
         if (i % 2 == 0)
            sum+=i*i;
        else if (i % 2 != 0 && i != 1)
            sum +=(i*i-1);
    }
    cout<<sum+2<<endl;
    return 0;
}

#include <bits/stdc++.h>
#include <iostream>
#include <cmath>
using namespace std;

#define forr(i,n)  for(int i = 0 ; i < n ; i++)
#define ll         long long

int main(){
    int t;
    cin>>t;
  cout<<t*(t+1)<<endl;
}

#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;

int n;
int main() {
	cin >> n;
	cout << pow(2, n+1) ;

	return 0;
}

#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
#include<string>
using namespace std;
#define ll long long
#define mod 1000000007
void  code550(string number, int size)
{
	for(int i=0;i<size;i++)
	{
		if((number[i]-'0')%8==0)
		{
			cout<<"YES"<<endl;
			cout<<number[i];
			return;
		}
	}
	for(int i=0;i<size;i++)
	{
		for(int j=i+1;j<size;j++)
		{
			if(((number[i]-'0')*10+number[j]-'0')%8==0)
			{
				cout<<"YES"<<endl;
				cout<<(number[i]-'0')*10+number[j]-'0';
				return;

			}
		}
	}
	for(int i=0;i<size;i++)
	{
		for(int j=i+1;j<size;j++)
		{
			for(int k=j+1;k<size;k++)
				if(((number[i]-'0')*100+(number[j]-'0')*10+(number[k]-'0'))%8==0)
				{
					cout<<"YES"<<endl;
					cout<<(number[i]-'0')*100+(number[j]-'0')*10+(number[k]-'0');
					return ;
				}
		}
	}
	cout<<"NO";
}
vector<int> code( vector<int> &output,int input)
{
	if(input==2)
	{
		output.push_back(2);
	}
	else if (input==3)
	{output.push_back(3);}
	else if (input==4)
	{output.push_back(3);
	output.push_back(2);
	output.push_back(2);}
	else if(input == 5){output.push_back(5);}
    else if(input == 6){output.push_back(5); output.push_back(3);}
    else if(input == 7){output.push_back(7);}
    else if(input == 8){output.push_back(7); output.push_back(2); output.push_back(2); output.push_back(2);}
    else if(input == 9){output.push_back(7); output.push_back(3); output.push_back(3); output.push_back(2);}
	return output;
}
int main()
{
	int n;
	cin>>n;
	cout<<(pow(2.0,n+1.0)-2);
	return 0;
}

#include <iostream>
#include <iomanip>
#include <cmath>
#include <iomanip>
using namespace std;

int main ()
{
   long double a,c=2,ans=0,i;
    cin>>a;
    for(i=1;i<=a;i++)
    {
        ans+=c;
        c*=2;
    }
    cout<<ans;

    return 0;
}

#include<stdio.h>
#include<math.h>
int ans[1000];
void dabiao()
{
    ans[1]=2;
    ans[2]=6;
    for(int i=3;i<=55;i++)
        ans[i]=ans[i-1]+pow(2,i);
}
int main()
{
    int n;
    dabiao();
    while(~scanf("%d",&n))
    {
        printf("%d\n",ans[n]);
    }
    return 0;
}
/*2017-02-22 18:15:54.442*/

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>

using namespace std;

int main (int argc, char ** argv)
{
    long long n;
    cin>>n;
    long long res=1, ans=0;
    for (int i=1; i<=n; i++)
    {
        res=res<<1;
        cout<<res<<'\n';
        ans+=res;
    }
    cout<<ans<<'\n';
    return 0;
}

#include <iostream>

using namespace std;

int main() {
    long long n;
    cin >> n;
    cout << (2LL * (2LL << n - 1LL));
}

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main() {
	int n;
	cin>>n;
	cout<<(2*n+(3*n)-(2*n));

	return 0;
}

	#include<stdio.h>
#include<math.h>
#include<stdlib.h>
int main()
{
long long int i,n,s1=0,s=1;
	scanf("%lld",&n);
	for(i=1;i<=n;i++)
	{
	s*=2;
	s1+=s;
	s1=s1%1000000007;
	}
printf("%lld\n",s1);

}

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main() {
	int n;
	cin>>n;
	cout<<(2*n+(n-1)*(n-1)*(n-1));

	return 0;
}

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include<cmath>
#include<string>
#include<cstring>
#include<cctype>
#include<math.h>

using namespace std;

int main(){
    long long n;
    cin>>n;
    long long t = 2 * (pow(2, n) - 1);
    cout << t<<endl;
 }

#include <bits/stdc++.h>
using namespace std;
#define test int t; cin>>t; while (t--)
#define ll long long int
#define fellow_junior  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int main()
{
   fellow_junior

   ll a,c,d,e,i,k,l;
   cin>>a;
   c=2;
   for(i=1;i<=a-1;i++)
   {
       c+=4;
   }
   cout<<c<<endl;
   return 0;
}

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
	int n,s,t;
	cin>>n;
	if(n>1){
	s=pow(2,n)-1;
	t=2*s;
	cout<<t;
	}
	else{
		cout<<"2";
	}
}

#include<bits/stdc++.h>
#define pb push_back
using namespace std;
int n, cnt;
int main(){
    cin >> n;
    for( int i = 1; i <= n; i ++ ){
        cnt+=pow(2,i);
    }
    cout << cnt;
}

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef signed long long int ll;
#define pb push_back
#define mp make_pair
#define endl "\n"
#define mod 1000000007
ll gcd(ll a,ll b)
{
  if(a==0)
    return b;
  return gcd(b%a,a);
}
int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ll f[56];
  f[0]=0;
  f[1]=2;
  ll n;
  cin>>n;
  for(ll i=2;i<=n;i++)
  {
    for(ll j=1;j<i;j++)
    {
      f[i]+=f[j];
    }
    f[i]+=ll(pow(2,i));
  }
  cout<<f[n]<<endl;
return 0;
}

#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    ll n,k;
    cin>>n;
    k=pow(2,n+1)-2;

    cout<<k<<endl;
}

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <iomanip>

using namespace std;

int main()
{
    int n;

    cin >> n;

    cout << setprecision(100) << pow(2,n+1)-2 << "\n";

    return 0;
}

#include <iostream>
#include <cmath>
using namespace std;
void main()
{
	double n,s=0,i;
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		s += pow(2, i);
	}
	cout << s;
}