import math num = int(raw_input()) sn = [] sn.append(0) sn.append(1) for i in range( num-1 ): i = i+2 ss = i*sn[-1] + sn[-2] sn.append(ss) an = sn[-1] - sn[-3] print sn print an%1000000007