仅包含三个正整数N, x, M.
仅包含一个整数, 即所求的答案.
3 4 1000
444
30%的测试数据, 1 <= N <= 100000 100%的测试数据, 1 <= N , M <= 2 * 10^9, 1 <= x <= 50.