import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(read()) MOD = 10**6 + 7 x = (N+2) // 2 y = (N+2) - x print((x*y-1) % MOD)