#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
  long dp[40];
  fill_n(dp, 40, 0);

  dp[0] = 1;

  for (int i = 1; i < 40; ++i) {
    for (int j = 1; j <= 3; ++j) {
      if (i-j>=0) dp[i] += dp[i-j];
    }
  }

  int n;
  while (cin >> n) {
    cout << dp[0]/3650 + 1 << endl;
  }
}