You are given a string consisting of characters and/or with an arbitrary integer .
Without any reason, I want to evaluate this following function with the value and . 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 will have zero in the first and last position, and the indices are zero-based on the above function.
The input is composed of two lines.
The first line of the input contains a string, — The first parameter of the function, mentioned in the statement.
The second line contains an integer, — the second parameter of the function.
Print the string, output of the function, in a single line.