#CCBCHBAHAI0000007. Phần tử ở vị trí p (Element at Position p)

Phần tử ở vị trí p (Element at Position p)

Element at Position p

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

You are given an integer array aa of length nn. Positions in the statement are numbered from 11 to nn: position 11 stores a0a_0, position 22 stores a1a_1, and in general position pp stores ap−1a_{p-1}. Print the value at the valid position pp.

Input

  • The first line contains two integers nn and pp, where pp is 1-based.
  • The second line contains exactly nn integers a0,a1,…,an−1a_0,a_1,\ldots,a_{n-1}.

Output

Print one integer: ap−1a_{p-1}.

Subtasks

Subtask 1 (20 points): 1≤n≤101 \le n \le 10, p=1p=1, −9≤ai≤9-9 \le a_i \le 9.

Subtask 2 (30 points): 2≤n≤202 \le n \le 20, p=np=n, 0≤ai≤1040 \le a_i \le 10^4.

Subtask 3 (50 points): 1≤p≤n≤10001 \le p \le n \le 1000, −109≤ai≤109-10^9 \le a_i \le 10^9.

Examples

Input

5 3
8 6 7 5 3

Output

7

Explanation

Position p=3p=3 is 1-based, so the corresponding 0-based index is p−1=2p-1=2. The sample has a2=7a_2=7, therefore the output is 7.