~/algor $ cat problems/massiv-k-chi-element
Print the k-th element
Easy
1000 ms
128 MB
20%
A positive integer $n$, an array of $n$ integers and a position $k$ ($1 \le k \le n$) are given. Find the element of the array at position $k$.
Input
The first line contains a positive integer $n$. The second line contains $n$ integers. The third line contains $k$.
Output
One integer — the element at position $k$.
Note
$1 \le n \le 10^{4}$
$-1000 \le a_{i} \le 1000$
$1 \le k \le n$
Examples
Input #1
5 10 20 30 40 50 3
Output #1
30
Input #2
1 -7 1
Output #2
-7