#include <iostream>
using namespace std;

int dp[31];

int main() {
	int n;
	cin >> n;
	
	dp[1] = 1;
	dp[2] = 2;
	dp[3] = 4;
	for(int i = 4; i <= n; i++)
		dp[i] = dp[i - 1] + dp[i - 2] + dp[i - 3];
		
	int ans = (dp[n] % 3650 == 0) ? dp[n] /3650 : dp[n] / 3650 + 1;
	
	cout << ans << endl;
	return 0;
}