md=10**9+7 n=gets.to_i a=Array.new(n+1){0} a[1]=1 od, ev=1, 0 (2..n).each do |i| if i%2==0 a[i]=i*od%md ev=(ev+a[i])%md else a[i]=i*ev%md od=(od+a[i])%md end end puts a[n] =begin n : even an=n*(a1+a3+...+an-1) =n*(a1+(n*a2)+...+(n-1)*(a2+a4+...+an-2)) =end