# 2016.2.13 import time N = input() alpha = [0 for i in range(0, N)] beta = [0 for i in range(0, N)] start = time.time() if N < 3: print "0" else: flag = "alpha" alpha[0] = 4 alpha[1] = 2 beta[0] = 4 beta[1] = 2 for i in xrange(3, N): if flag == "alpha": for j in xrange(0, min(i-1, N/2)): tmp = alpha[j] beta[j] = 2 * tmp for j in xrange(0, min(i-1, N/2)): tmp = alpha[j] beta[j-1] += tmp * j beta[j+1] += tmp * (i - 1 - j) flag = "beta" else: for j in xrange(0, min(i-1, N/2)): tmp = beta[j] alpha[j] = 2 * tmp for j in xrange(0, min(i-1, N/2)): tmp = beta[j] alpha[j-1] += tmp * j alpha[j+1] += tmp * (i - 1 - j) flag = "alpha" if flag == "alpha": print alpha[0] % 1000000007 else: print beta[0] % 1000000007 #print int((time.time() - start) * 1000), "ms"