N,MOD = map(int,input().split()) #dp[i][j][k]: 0がi個、1がj個、転倒数がk個 X = N*(N-1)//2 dp = [[[0]*(X+1) for _ in range(2*N+1)] for _ in range(2*N+1)] dp[0][0][0] = 1 #print(dp) for i in range(2*N+1): for j in range(2*N+1): for k in range(X+1): if i >= j: #i