#0002D7

Returning Prince

On the country of Checkering, there were a Queen and her beloved son, a Prince. After months of hardworking, the Queen thinks that the Prince deserves some vacation, so the Queen gives the Prince k days to go for some trip and on the k-th day, the Prince should have already come back to the castle.



Country of Checkering is a n x n square (2<=n<=100) array. The castle (the initial place of Prince) is on the first row and first column. Each day, the Prince could go as far as possible, as long as the destination trip is on the same row or on the same column as he is now and everyday he must move out from his current place. The Prince also can stay on the castle while on his trip but the same rule applies, he must move out the following day. The Prince then goes happily in the trip with promise that he will already in the castle on the k-th day.But suddenly, on the p-th day, the castle is being attacked and the Queen sends message to the Prince to return the next day (that is, the (p+1)-th day). The Prince could be anywhere in the map, but the message gets to him instantly. Your task is to compute the probability of the Prince could come back to the castle in time. If the Prince is already in the castle on the p-th day, it's counted as a succeed possibility. The output should be an integer in the range 0 to 1000 (inclusive) as 1000 times of the probability, rounded down (so, 0 is impossible, 1000 is always possible)



InputThe input consists of 3 lines. The first line contains one number n the size of the map. The second line contains one number k (3<=k<=100) the day limit of the trip. And the third line contains one number p (1<=p<=k-1) the day when the castle is attacked. We are using standard input.


OutputThe output consists of a single line containing one integer, the probability on the range 0 to 1000 inclusive. WARNING: The computations can involve very large values.



Input:
3
4
2

Output:
500



Input:
3
4
1

Output:
1000



Input:
3
4
3

Output:
1000



Input:
3
5
3

Output:
625

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.