import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.container;

void main()
{
	while (1) {
		auto x = readln.chomp.to!int;
		if (!x) break;
		auto dp = new long[](x + 3);
		dp[0] = 1;
		foreach (i; 0..x) {
			dp[i+1..i+4] += dp[i];
		}
		writeln((dp[x] / 10.0 / 365.0).ceil);
	}
}