#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 of length . Positions in the statement are numbered from to : position stores , position stores , and in general position stores . Print the value at the valid position .
Input
- The first line contains two integers and , where is 1-based.
- The second line contains exactly integers .
Output
Print one integer: .
Subtasks
Subtask 1 (20 points): , , .
Subtask 2 (30 points): , , .
Subtask 3 (50 points): , .
Examples
Input
5 3
8 6 7 5 3
Output
7
Explanation
Position is 1-based, so the corresponding 0-based index is . The sample has , therefore the output is 7.