#include<bits/stdc++.h>
using namespace std;
/* 変数名を被らせない
   デバッグコードを取り除く */
#define ANSWER(x) cout<<x<<endl
#define debug(x) cout<<#x<<": "<<x
const int MAX_INT = 1000000;
int n;
int solve(int a);
int main(){
  cin >> n;
  cout << (solve(n)/10+365)/365 << endl;
}
int solve(int a){
  if(a == 0)return 1;
  else if(a < 0)return 0;
  else return solve(a-1)+solve(a-2)+solve(a-3);
}