integer*8::N read *,N print '(i0)',MOD(N**3,1000000007) end