#include <iostream>
#include<cstdio>
using namespace std;
int total;
int sum(int num,int step,int x){
if(num>x){
return 0;
}
if(num==x&&step%2==0){
total++;
return 0;
}
sum(num+1,step+1,x);
sum(num+2,step+1,x);
}
int main(){
int n;
cin>>n;
sum(0,0,n);
cout<<total<<endl;
return 0;
}
#include <iostream>
#include<cstdio>
using namespace std;
int total;
int sum(int y,int num,int step){
if(num<0){
return 0;
}
if(num==0&&step%2==0){
total++;
return 0;
}
sum(y,num-1,step+1);
sum(y,num-2,step+1);
}
int main(){
int n;
cin>>n;
sum(n,n,0);
cout<<total<<endl;
return 0;
}