#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, ns;
  cin >> n >> k;
  vector<long long> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  ns = (long long)(sqrt(1 + 8 * k) - 1) / 2;
  k -= (ns * (ns + 1)) / 2;
  if (k == 0)
    cout << arr[ns - 1];
  else
    cout << arr[k - 1];
  return 0;
}
