#C2211. K-th Smallest Delivery Time

    ID: 45503 Type: Default 1000ms 256MiB

K-th Smallest Delivery Time

K-th Smallest Delivery Time

You are given a list of n delivery times and an integer k. Your task is to determine the k-th smallest delivery time from the list.

After sorting the list in non-decreasing order, the k-th smallest delivery time is located at position k (using 1-based indexing). In mathematical terms, if the sorted list is \(a_1, a_2, \dots, a_n\), then you should output \(a_k\).

Note: The input is provided via standard input (stdin) and the output should be printed to standard output (stdout).

inputFormat

The first line contains an integer n representing the number of delivery times.

The second line contains n space-separated integers representing the delivery times.

The third line contains an integer k which indicates that you need to find the k-th smallest delivery time.

outputFormat

Output a single integer which is the k-th smallest delivery time.

## sample
6
5 3 9 1 6 7
3
5