#include <bits/stdc++.h>

using namespace std;
long long n,k,a[1000005];
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie();cout.tie();
    freopen("CAU1.inp","r",stdin);
    freopen("CAU1.out","w",stdout);
    cin>>n>>k;
    for(int i=1;i<=n;i++)
    cin>>a[i];
    if(k%n==0)
    {
        cout<<a[1];
        return 0;
    }
    while(k>n)
    k-=n;
    cout<<a[k+1];
    return 0;
}
