#include <bits/stdc++.h>
int main() {
  long long int safa[1000000], i, n, j, k, m;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%d", &safa[i]);
  }
  for (i = 1; i < m; i++) {
    m -= i;
  }
  printf("%d", safa[m]);
}
