#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
using namespace std;

signed main(){
    int n;
    while(cin >> n){
        int ans = 0;
        int memo[31] = {0};
        memo[0] = 0;
        rep(i, 1, n + 1){
            int t = min(i - 1, n - i);
            ans += 2*memo[t] + 1;
            memo[i] = ans;
            //cout << i << ' ' << memo[i] << endl;
        }
        cout << ans << endl;
    }
}