N=int(input()) ANS=0 for i in range(int(N//2-5),int(N//2+5)): ANS=max(ANS,(i+1)*(N-i+1)) print((ANS-1)%(10**6+7))