a1, a2, b = 1, 0, 0 div = 10**9 + 7 gets.to_i.pred.times{ a1, a2, b = b, a1, a1+a2 a1 %= div a2 %= div b %= div } puts (a1 + a2 + b) % div