#include<stdio.h>
int main()
{
int n,i,x1,x2;
while(scanf("%d",&n)!=EOF)
{
x2=1;
for(i=1;i<n;i++)
{
x1=2*(1+x2);
x2=x1;
}
printf("%d\n",x1);
}
return 0;
}
原文:http://www.cnblogs.com/gongpulin/p/3881143.html