#include <stdio.h>
#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int f(int n);
int main(int argc, char *argv[]) {int n;while(scanf("%d",&n)!=EOF){printf("%d\n",f(n));}return 0;
}
int f(int n){int zh;if(n==1||n==2) zh=1;if(n==3) zh=2;if(n>3) zh=f(n-1)+f(n-3);return zh;}