#include"stdio.h" int main() { int f[31]; int i,l; int n; f[0]=1; for(i=1;i<=30;i+=2) f[i]=0; for(i=2;i<=30;i+=2) { f[i]=0; for(l=2;l<=i;l+=2) { if(l==2) f[i]+=3*f[i-l]; else f[i]+=2*f[i-l]; } } while(scanf("%d",&n),n!=-1) printf("%d\n",f[n]); return 0; }