#include<iostream>
#include<cstring>
using namespace std;
int ans;
int n;
void dfs(int u)
{
if(u == n) ans ++;
if(u > n) return;
dfs(u+1),dfs(u + 2),dfs(u + 3);
}
int main()
{
cin >> n;
dfs(0);
cout << ans << endl;
return 0;
}