mod = (10 ** 9 + 7) def main(): n = int(input()) zero, one, one_one = 0, 1, 0 for _ in range(1, n): zero, one, one_one = one + one_one % mod, zero % mod, one % mod print((zero + one + one_one) % mod) if __name__ == '__main__': main()