#include <iostream>
using namespace std;
int main() {
int n;
cin>>n;
unsigned long long t = 2;
cout<<3*(t<<(n-1))-2;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbjsKCWNpbj4+bjsKCXVuc2lnbmVkIGxvbmcgbG9uZyB0ID0gMjsKCWNvdXQ8PDMqKHQ8PChuLTEpKS0yOwp9