output_description: Print the number of ways to assign scores to the problems, modulo M.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
attempt: n, m = map(int, input().split())
  n_l = [i for i in range(1, n + 1)]
  ans = 0
  import itertools
  
  l1 = list(itertools.combinations(n_l))
  for i in range(len(l1)):
      for j in range(2**n):
          l2 = [0] * n
          for k in range(n // 2):
              if (j >> k) & 1:
                  l2[k] = 1
          flag = True
          cnt1 = 0
          cnt2 = 0
          for l in range(n):
              if l2[l]:
                  cnt1 += l1[l]
              else:
                  cnt2 += l1[l]
          if cnt2 > cnt1:
              ans += 1
  print(ans)
  
problem_description: Statement
  
  N problems have been chosen by the judges, now it's time to assign scores to
  them!
  
  Problem i must get an integer score A_i between 1 and N, inclusive. The
  problems have already been sorted by difficulty: A_1 \le A_2 \le \ldots \le
  A_N must hold. Different problems can have the same score, though.
  
  Being an ICPC fan, you want contestants who solve more problems to be ranked
  higher. That's why, for any k (1 \le k \le N-1), you want the sum of scores of
  any k problems to be strictly less than the sum of scores of any k+1 problems.
  
  How many ways to assign scores do you have? Find this number modulo the given
  prime M.
samples: [{"input": "2 998244353", "output": "3\n    \n\nThe possible assignments are (1, 1), (1, 2), (2, 2).\n\n* * *"}, {"input": "3 998244353", "output": "7\n    \n\nThe possible assignments are (1, 1, 1), (1, 2, 2), (1, 3, 3), (2, 2, 2), (2,\n2, 3), (2, 3, 3), (3, 3, 3).\n\n* * *"}, {"input": "6 966666661", "output": "66\n    \n\n* * *"}, {"input": "96 925309799", "output": "83779"}]