#include <iostream>
#include <unordered_map>
using namespace std;


struct ListNode {
    int val;
    ListNode* next;
    ListNode(int x): val(x), next(nullptr) {}
};
int main() {
    int n;
    while (cin >> n) {
        int h;
        cin >> h;
        ListNode* head = new ListNode(h);
        ListNode* cur = head;
        //构造一个链表
        for (int i = 1; i < n; i++) {
            int a;
            cin >> a;
            ListNode* node = new ListNode(a);
            cur->next = node;
            cur = cur->next;
        }

        //找出倒数第k个节点
        int k;
        cin >> k;
        ListNode* slow = head;
        ListNode* fast = head;
        for (int i = 0; i < k; i++) {
            fast = fast->next;
        }
        while (fast) {
            slow = slow->next;
            fast = fast->next;

        }
        cout << slow->val << endl;
        cur = head;
        while (cur != nullptr) {
            ListNode* temp = cur;
            cur = cur->next;
            delete temp;
        }
    }
    return 0;

}
// 64 位输出请用 printf("%lld")