倒着退回去就行了
/**
* 03.01 21:57
*
**/
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int n;
while(scanf("%d", &n) != EOF){
int begin = 1;
for (int i = 0; i < n-1; i++){
begin = (begin + 1) * 2;
}
printf("%d\n", begin);
}
return 0;
}