#include <iostream>
using namespace std;

int num(int n);

int main(){
  int n;
  cin>>n;
  cout << num(n)/3650 <<endl;
}

int num(int n){
    switch (n)
    {
        case 1: return 1;
        case 2:  return 2;
        case 3:  return 4;
    }
  return num(n-1)+num(n-2)+num(n-3);
}