n = int(input()) a, b, c = 1, 0, 0 ta, tb, tc = 0, 0, 0 mod = pow(10, 9) + 7 while n > 0: ta, tb, tc = a, b, c a = (tb + tc) % mod b = ta c = tb n -= 1 print(((a + b) % mod + c) % mod)