include [HTML_REMOVED]
using namespace std;
int getsteps(int n)
{
if(n == 1)
{
return 1;
}else if(n == 2)
{
return 2;
}else if(n == 3)
{
return 4;
}
return getsteps(n-1) + getsteps(n-2) + getsteps(n-3);
}
int main()
{
int n = 0;
cin >> n;
int count = 0;
count = getsteps(n);
cout << count << endl;
return 0;
}