import java.util.Scanner;
/**
* HJ51 输出单向链表中倒数第k个结点-简单
*/
public class HJ051 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int num = sc.nextInt();
ListNode header = new ListNode();
for (int i = 0; i < num; i++) {
int value = sc.nextInt();
ListNode node = new ListNode(value, header.next);
header.next = node;
}
int target = sc.nextInt();
for (int i = 0; i < target; i++) {
header = header.next;
}
System.out.println(header.value);
}
sc.close();
}
public static class ListNode {
int value;
ListNode next;
ListNode() {
}
ListNode(int value, ListNode next) {
this.value = value;
this.next = next;
}
}
}