import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNext()){ int count=sc.nextInt(); Node pre=null; Node head=null; for(int i=0;i<count;i++){ int cur=sc.nextInt(); Node curnode=new Node(cur); head=curnode; curnode.next=pre; pre=curnode; } int k=sc.nextInt(); Node point=head; for(int i=1;i<k;i++){ point=point.next; } System.out.println(point.getValue()); } } } class Node{ int value; Node next; public Node(int k){ this.value=k; } public int getValue(){ return this.value; } } // 注意节点顺序