#include <bits/stdc++.h>
using namespace std;
long long a[501001];
pair<int, int> v[501001];
int main() {
  long long n, i, j, m, c = 1, x, y, c2 = 1, k = 1;
  scanf("%lld%lld", &n, &m);
  for (i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  while (c <= m) {
    k = c;
    c += c2;
    if (k == m) {
      break;
    }
    if (c > m) {
      break;
    }
    c2++;
  }
  i = 0;
  while (k <= c) {
    if (k == m) {
      printf("%lld\n", a[i]);
      break;
    }
    k++;
    i++;
  }
  return 0;
}
