N = gets.to_i ans = (1..N).inject{|memo, n| (((memo * n) % 1000000007) * (2 * n - 1)) % 1000000007} puts ans