Execution time limit is 1 second Runtime memory usage limit is 128 megabytes Find the k-th number in array A= <a1,a2,...,an> sorted in increasing order.
Array A is generated with the polynom P(x)=132x3+77x2+1345x+1577:ai=P(i) mod 1743.
Input
Two positive integers n and k (1≤k≤n≤50000).
Output
Print the k-th number in sorted array А.
Examples