// yukicoder My Practice // author: Leonardone @ NEETSDKASU open System let n = int64(Console.ReadLine()) let md = 1000000007L let rec f a b c n = if n = 0L then (a + b + c) % md else f ((b + c) % md) a b (n - 1L) printf "%d" <| f 0L 1L 0L (n - 1L)