MOD = 10 ** 6 + 7 N = int(input()) ans = ((N//2 + 1) * (N - N//2 + 1) - 1) % MOD print(ans)