#Lutece2313. Sugarii and String

Sugarii and String

Migrated from Lutece 2313 Sugarii and String

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

pic

Sugarii is very good at solving string problems. One day, a string SS suddenly comes to his mind. It is a string with nn digits and consists of only 00 and 11. Then he figures out a way to make it longer with the following steps:

  1. Copy SS to a new string TT.
  2. Reverse every digit in TT. That is, for every digit in TT, if it's 00, change it to 11; if it's 11, change it to 00.
  3. Append TT to the end of SS.
  4. Go back to step 1.

For example, if SS is initially 110110, then it becomes 110001110001, and then 110001001110110001001110, and then 110001001110001110110001110001001110001110110001... The final string can be as long as you want. Sugarii wants to know whether the kk-th digit of the final string is 00 or 11.

Input

The first line contains two integers nn and kk (1n1051 \le n \le 10^5, 1k10181 \le k \le {10}^{18}) — the length of string SS and the digit Sugarii wants to know.

The second line contains a string SS, consisting of 00 and 11.

Output

Print the kk-th digit of the final string (00 or 11).

Samples

3 5
110
0
1 10
1
1

Note

In the first sample, the final string is 110001001110001110110001110001001110001110110001... , the 5th digit is 00.

In the second sample, the final string is 10010110011010011001011001101001... , the 10th digit is 11.

Resources

电子科技大学第十一届 ACM 趣味程序设计竞赛