#include<stdio.h>

int main(){

         int f[50],i,n;

         while(scanf("%d",&n)!=EOF){

                   f[1]=1;f[2]=2;f[3]=3;

                   for(i=4;i<=n;i++){

                            f[i]=f[i-3]+f[i-1];

                   }

                   printf("%d\n",f[n]);

         }

         return 0;

}