You are given an integer n and a prime modulo m.
Calculate the sum of distances between the first and the second vertices over all distinct labeled connected graphs with n vertices.
Output any integer congruent to the actual sum modulo m. Formally, if the actual sum is S output any integer x such that −263≤x<263 and x−S is divisible by m.
The only line contains two integers n and m (2≤n≤400,106+3≤m≤109+9, m is prime), the number of vertices in the graphs and the modulo.
Print a single integer --- the answer to the problem.
If you manage to get WA in this problem and we reasonably believe that you did not intentionally try to do so, we might give you a cookie somehow.