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