#include <bits/stdc++.h>
using namespace std;
long long n, k, x;
int main(void) {
  cin >> n >> k;
  long long cont = 0;
  vector<long long> v;
  for (int i = 0; i < n; ++i) {
    cin >> x;
    v.push_back(x);
    if (cont + v.size() >= k) {
      for (int j = 0; j < v.size(); ++j) {
        cont++;
        if (cont == k) {
          cout << v[j] << "\n";
          return 0;
        }
      }
    } else
      cont += v.size();
  }
  return 0;
}
