Find the -th number in array A =~< a_1, a_2, ..., a_n > sorted in increasing order.
Array is generated with the polynom P(x) = 132x^3 + 77x^2 + 1345x + 1577: a_i = P(i)~mod~1743.
Two positive integers and k~(1 \le k \le n \le 50000).
Print the -th number in sorted array .
Example 1
Example 2