In a circle, there are objects labeled from to . Starting from the first object, every -th object is eliminated from the circle in turn, and this process continues until only one object remains.
For example, if N = 10 and k = 3, the order of elimination will be: , , , , , , , , . The object labeled will be the last one remaining.
The input contains two positive integers and . 1 \leq N \leq 500, 1 \leq k \leq 100.
The output should contain a single number—the label of the remaining object.
Example 1