Codeforces
CF Step
Youtube Linkedin Discord Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Statement : Grid Path

G. Grid Path

You are given a grid with n rows (numbered 1 to n top to bottom) and m columns (1 to m left to right). A chip starts at (1,1). In one move it can go left, right, or down: from (x,y) to (x,y1), (x,y+1), or (x+1,y). It cannot leave the grid.

You may make any number of moves (possibly zero). The path of the chip is the set of cells it visits at least once (the order of visits does not matter).

Your task is to count the number of possible paths. Output the answer modulo mod.


Input

One line with three integers n, m, and mod (1n108; 1m150; 2mod109).


Output

One integer — the number of possible paths modulo mod.


Examples

Input

2 2 100

Output

7

Input

1 5 777

Output

5

Input

5 3 998244353

Output

1695

Input

100000000 150 1000000000

Output

89058885