#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 100;
long long ans[maxn];
int main() {
  long long n, m;
  scanf("%I64d%I64d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%d", &ans[i]);
  int res1 = 0;
  for (int i = 1; i <= n; i++) {
    if ((long long)i * (1 + i) / 2 > m) {
      res1 = i;
      break;
    } else if ((long long)i * (1 + i) / 2 == m) {
      cout << ans[i] << endl;
      return 0;
    }
  }
  cout << ans[(long long)m - res1 * (res1 - 1) / 2] << endl;
  return 0;
}
