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