2322: ill

内存限制:128 MB 时间限制:3.000 S
评测方式:文本比较 命题人:
提交:202 解决:67

题目描述

An ACMer is ill."Why?",Liu Sir asked."Your cake is fantastic.So I ate too much......"He answered. Now,this poor guy is at hospital. There are so much people at hospital that day.Every one has an ID.No two IDs are same.Doctor call the number by ascending order.The ACMer wants to know who is the Kth people will be called.

输入

    There are several cases.
    For each case,there are two integer N and K in the first line,N indicate the number of people.(0<K<N<10^6)
    And N numbers follow,means the ID of the people.

输出

You should output the Kth ID of people.

样例输入 复制

3 2
4 2 5

样例输出 复制

4