def f(n): return ((n**2+3)//12+(n+2)//2)%MOD N = int(input()) MOD = 10**9+7 print(f(N-4))