integer*8::N integer*8,parameter::hou=1000007 read *, N print '(i0)',MOD(MOD(N/2+1,hou)*MOD(N-N/2+1,hou)-1+hou,hou) end program