#include<iostream>

using namespace std;

int ProgressNumberOfYears(int step_num, int step_kind)
{

  if(step_num == 0)
    return 1;
  else if(step_num < 0)
    return 0;

  int count = 0;

  for(int i = 1; i < 4; ++i) count = count + ProgressNumberOfYears(step_num - i,i);

  return count;

}

int main()
{

  int step_num;

  while(cin >> step_num && step_num != 0) cout << ProgressNumberOfYears(step_num,0)/10/365 + 1<< endl;

  return 0;

}