mod = 10 ** 9 + 7 def main(): n = int(input()) if n == 1: return 2 kk = 1 kp = 1 pk = 0 for i in range(2, n): kk, pk, kp = pk, kp, (kk + pk) % mod return (kk + pk + kp) % mod print(main())