蟠桃记

#include <cstdio>

long long int memo[33];

long long int f(long long int n)
{
	memo[1] = 1;
	for(long long int i = 2; i <= n; ++ i)
	{
		memo[i] = 2 * (memo[i - 1] + 1);
	}
	return memo[n];
}

int main()
{
	long long int n;
	while(scanf("%d", &n) != EOF)
	{
		printf("%d\n", f(n));
	}
	
	return 0;
}

  

posted @ 2019-07-28 22:09  青衫客36  阅读(107)  评论(0编辑  收藏  举报