#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, M;
  cin >> N >> M;
  vector<long long> arr(N);
  for (long long i = 0; i < N; ++i) cin >> arr[i];
  long long idx = 0, i = 1;
  while (idx < M) {
    idx += i;
    i++;
  }
  cout << arr[M - (idx - i + 1) - 1] << endl;
}
