//#include //#include //#include //#include //#include //#include //#include //using namespace std; //#include //#include //#include //#include //#include //#pragma comment(linker, "/STACK:1024000000,1024000000") //#include //typedef long long LL; //const int MAXN = 100009;//点数的最大值 //const int MAXM = 604000;//边数的最大值 //const LL INF = 1152921504; //const LL mod= 258280327; //int n; //struct node //{ // int a,b; //}p[1234]; //vectorg[123]; //int gao(int x) //{ // int ans=0; // while(x) // { // if(x&1) ans++; // x>>=1; // } // return ans; //} //int gao(int i,int j) //{ // int x=(p[i].a-p[j].a); // int y=(p[i].b-p[j].b); // for(int l=0;l w)//1 2 3 4 //{ // int x[4]; // for(int i=0;i<4;i++) // x[i]=w[i]; // sort(x,x+4); // do // { // int t[4]; // for(int i=0;i<4;i++) // t[i]=gao(x[i],x[(i+1)%4]); // if(t[0]==t[1]&&t[1]==t[2]&&t[2]==t[3]) // return true; // }while(next_permutation(x,x+4)); // return false; //} //int main() //{ // int top=(1<<20); // for(int i=0;i<=20;i++) // g[i].clear(); // for(int i=1;i=big) break; // vectorwin; // win.clear(); // int now=0; // while(x) // { // if(x&1) win.push_back(now); // now++; // x>>=1; // } // if(yes4(win)) // ans++; // } // printf("%d\n",ans); // } // return 0; //} ///* //*/ #include #include #include #include #include #include #include using namespace std; #include #include #include #include #include #pragma comment(linker, "/STACK:1024000000,1024000000") #include typedef long long LL; const int MAXN = 100009;//点数的最大值 const int MAXM = 604000;//边数的最大值 const LL INF = 1152921504; const LL mod= 258280327; LL a[123]; int main() { int n; a[1]=1; a[2]=2;;a[3]=3; for(int n=4;n<=66;n++) { a[n]=a[n-1]+a[n-3]+1; } while(scanf("%d",&n)!=EOF) { cout<