#include <iostream>
using namespace std;

int main()
{
  string s;
  cin >> s;
  cout << num(stoi(strPlus)) <<endl;
  return 0;
}

int num(int n){
  if(n<0)return 0;
  return num(n-1)+num(n-2)+num(n-3);
}