Lemurian parties
Lemur King Julian has exactly 2 * k lemurs under his control, 2 lemurs of each of k species. Julian loves to party, so he throws a party every night, but the VIP area unfortunately only has enough seats for him and n other lemurs.
Since Julian doesn't like having "the same" parties, he has to choose every day who to invite to the VIP area so that the sets of lemurs from the VIP area never repeat. Two lemurs of the same species are considered indistinguishable. Sets are considered equal if they match as multisets of lemur species.
Help Julian determine how many days he can hold various parties. Since the answer can be large, print it modulo m.
Input
One line contains two integers k, n and m (1 ≤ k ≤ 500 000, 0 ≤ n ≤ 2 * k, 2 ≤ m ≤ 10^9
) - the number of lemur species, the number of seats in the VIP area and the modulo to compute the answer.
Output
Print one number - the answer to the problem modulo m.