module Yuki open System let MOD = (int 1e9) + 7 (* Ken_1 -> A Ken_2 -> B Pa -> C *) [] type State = { A : int B : int C : int } member __.Sum = ((__.A + __.B) % MOD + __.C) % MOD let solve n = let rec f state = function | 0 -> state | n -> f { A = state.C; B = state.A; C = (state.A + state.B) % MOD } (n - 1) (f { A = 1; B = 0; C = 0 } (n - 1)).Sum let N = Console.ReadLine() |> int N |> solve |> Console.WriteLine