mint a,b,c,d,e,t;ll n;{rd(n);c=d=3;e=4;rep(i,a=b=1,n)t=a+a-b+c+c-d+e,a=b,b=c,c=d,d=e,e=t;wt(a);}