#include <bits/stdc++.h>
using namespace std;
long long n, now, power;
signed main() {
  scanf("%lld", &n);
  now = 2, power = 2;
  for (long long i = 2; i <= n; i++) {
    now += power * 2;
    power *= 2;
  };
  printf("%lld\n", now);
}
