#include <bits/stdc++.h>
using namespace std;
long long n, k;
int main() {
  cin >> n >> k;
  int need = 0;
  long long done = 0;
  for (int i = 1;; ++i) {
    done += i;
    if (done >= k) {
      need = i - (done - k);
      break;
    }
  }
  int x;
  for (int i = 0; i < need; ++i) scanf("%d", &x);
  printf("%d\n", x);
  return 0;
}
