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