import math num = int(raw_input()) def gusu(i, an): aa = 0 for j in range(i/2): aa += an[2*j] aa = aa * i return aa def kisu(i, an): aa = 0 for j in range(i/2): aa += an[2*j+1] aa = aa * i return aa an = [] an.append(1) for i in range(num-1): i=i+2 if i %2 == 0: an.append(gusu(i, an)) else: an.append(kisu(i, an)) print an[-1]%1000000007