N=int(raw_input()) print ((N/2+1)*(N-N/2+1)-1)%1000007