#include<iostream>

using namespace std;

long long memo[100], ans;

int N;

int main() {
	while (cin >> N) {
		memo[1] = 1;
		memo[2] = 2;
		memo[3] = 4;
		for (int i = 4; i <= N; i++) {
			memo[i] += memo[i - 1] + memo[i - 2] + memo[i - 3];
		}
		cout << memo[N] / (10 * 365) + 1 << endl;
	}
}