#include <iostream>

int main(int argc, char const* argv[])
{
    int dp[35] = {0};

    int n=1;
    std::cin >> n;


    dp[0] = 1;
    dp[1] = 1;
    dp[2] = 1;

    for (int i = 1; i < n; i++) {
        if(i >= 1) dp[i] += dp[i-1];
        if(i >= 2) dp[i] += dp[i-2];
        if(i >= 3) dp[i] += dp[i-3];
    }

    int year = 0;
    year = dp[n-1] / 3650;
    if ((dp[n-1] % 3650) > 0) year +=1;

    std::cout << year << std::endl;
    return 0;
}