You are given a string str consisting of characters 0 and/or 1 with an arbitrary integer n.
Without any reason, I want to evaluate this following function with the value str and n. Unfortunately, my function stops working for larger values. Can you help me to find the actual output of this function?
N.B: it is guaranteed initial str will have zero in the first and last position, and the indices are zero-based on the above function.
Input
The input is composed of two lines.
The first line of the input contains a string, str(1≤∣str∣≤100) — The first parameter of the function, mentioned in the statement.
The second line contains an integer, n(0≤n≤260)— the second parameter of the function.
Output
Print the string, output of the function, in a single line.