def kannon()
  n = gets.to_i
  a = []
  a[1] = 1
  a[2] = 2
  a[3] = 4
  if n > 3
    for i in 4..n
      a[i] = a[i-1] + a[i-2] + a[i-3]
    end
  end
  if a[n]%3650 == 0
    puts a[n]/3650
  else
    puts a[n]/3650 + 1
  end
end

kannon()