#include <iostream>
#include <algorithm>

using namespace std;

int main(void){
	int i, j, n, dp[31];
	cin >> n;
	fill(dp,dp + 31,0);
	dp[0] = 1;
	for(i = 0;i < n;i++){
		for(j = 1;j <= 3;j++){
			if(i + j <= n){
				dp[i + j] += dp[i];
			}
		}
	}
	cout << dp[n] / 3650 + 1 << endl;
	return 0;
}