#include<bits/stdc++.h>
using namespace std;
unsigned long long n,f[50] = {2};
int main() {
	ios::sync_with_stdio(false);
	cin >> n;
	for(int i = 1; i <= n; i++)
		f[i] = f[i - 1] * 2 + 2;
	cout << f[n] << endl;
	return 0;
}