#include <bits/stdc++.h>
using namespace std;
int s[100005];
int main() {
  int n, m;
  while (cin >> n >> m) {
    for (int j = 1; j <= n; j++) scanf("%d", &s[j]);
    int i = 1, sum = 1;
    if (sum < m)
      for (i = 2;; i++) {
        if (sum >= m) {
          i--;
          break;
        }
        sum += i;
      }
    i--;
    int sum1 = (1 + i) * i / 2;
    cout << s[m - sum1] << endl;
  }
  return 0;
}
