N = input() champ = -1 for n in xrange(N/2-5, N/2+5): p = (n+1) * (N-n) + n champ = max(champ, p) print champ%(10**6+7)