Given a positive integer $$$s$$$ as its first term, a sequence of positive integers $$$a_1, a_2, \ldots$$$ is defined as follows.
That is, the $$$(i+1)$$$-th term $$$a_{i+1}$$$ is the number of times the value of its directly preceding term $$$a_i$$$ appears among the first through the $$$i$$$-th terms. For example, when $$$s = 3$$$, the first $$$12$$$ terms of the sequence are $$$3, 1, 1, 2, 1, 3, 2, 2, 3, 3, 4,$$$ and $$$1.$$$
Given two positive integers $$$s$$$ and $$$k$$$, find the value of $$$a_k$$$, the $$$k$$$-th term of the sequence.
The input contains one or more test cases, each in the following format.
| $$$s$$$ $$$k$$$ |
A test case consists of two positive integers $$$s$$$ and $$$k$$$ ($$$1 \le s \le 10^9$$$, $$$1 \le k \le 10^9$$$).
The end of the input is indicated by a line containing two zeros. The number of test cases does not exceed $$$100$$$.
For each test case, output in a line the value of $$$a_k$$$, the $$$k$$$-th term of the sequence.
3 13 23 33 43 56 100100000000 100000000123456789 98765432131415926 5358979320 0
3 1 1 2 1 12 50000000 5 16621598