#include <iostream>
using namespace std;
long long solve(int now){
    if(now==0) return 1;
    if(now<0)  return 0;
    long long res=solve(now-1)+solve(now-2)+solve(now-3);
    return res;
}
int main(void){
    int n;
    cin>>n;
    solve(n);
    cout<<solve(n)/3650+1<<endl;
    // Your code here!
    
}