In late autumn evening n robots gathered in the cheerful company of friends. Each robot has a unique identifier — an integer from 1 to 10^9.

At some moment, robots decided to play the game "Snowball". Below there are the rules of this game. First, all robots stand in a row. Then the first robot says his identifier. After that the second robot says the identifier of the first robot and then says his own identifier. Then the third robot says the identifier of the first robot, then says the identifier of the second robot and after that says his own. This process continues from left to right until the n-th robot says his identifier.

Your task is to determine the k-th identifier to be pronounced.


-----Input-----

The first line contains two positive integers n and k (1 ≤ n ≤ 100 000, 1 ≤ k ≤ min(2·10^9, n·(n + 1) / 2).

The second line contains the sequence id_1, id_2, ..., id_{n} (1 ≤ id_{i} ≤ 10^9) — identifiers of roborts. It is guaranteed that all identifiers are different.


-----Output-----

Print the k-th pronounced identifier (assume that the numeration starts from 1).


-----Examples-----
Input
2 2
1 2

Output
1

Input
4 5
10 4 18 3

Output
4



-----Note-----

In the first sample identifiers of robots will be pronounced in the following order: 1, 1, 2. As k = 2, the answer equals to 1.

In the second test case identifiers of robots will be pronounced in the following order: 10, 10, 4, 10, 4, 18, 10, 4, 18, 3. As k = 5, the answer equals to 4.

Difficulty: interview

Starter code:

Solutions:
n,k = list(map(int, input().split()))
L = list(map(int, input().split()))
i = 1
while k > 0:
    k = k - i
    i += 1
k = k + i - 1
print(L[k-1])


#!/usr/bin/env python3

try:
    while True:
        n, k = list(map(int, input().split()))
        a = list(map(int, input().split()))
        for i in range(1, n + 1):
            if k <= i:
                print(a[k - 1])
                break

            k -= i

except EOFError:
    pass


n, k = map(int, input().split())
IDs = list(map(int, input().split()))

ans = 0
for i in range(1, n+1) :
    if i < k :
        k -= i
    else :
        ans = IDs[k-1]
        break

print(ans)

n, k = list(map(int, input().split()))
k -= 1
a = list(map(int, input().split()))
tri = [1]

for x in range(2, n + 1):
    tri.append(tri[-1] + x)

if k == 0:
    print(a[0])
else:
    lo = 0
    hi = len(tri) - 1
    while lo + 1 < hi:
        mid = (lo + hi) // 2
        if tri[mid] > k:
            hi = mid
        else:
            lo = mid

    # in bucket hi
    index = k - tri[hi - 1]
    print(a[index])


n, k = map(int, input().split())
a = list(map(int, input().split()))
l, r = 0, n
while (r - l > 1):
    m = (r + l) // 2
    s = m * (m + 1) // 2
    if (s < k):
        l = m
    else:
        r = m
k -= l * (l + 1) // 2
print(a[k - 1])

n, k = list(map(int, input().split()))
l = [0] + list(map(int, input().split()))
m = 0
for i in range(1, n + 1):
    if i * (i + 1) < k + k:
        m = i
    else:
        break
print(l[k - (m * (m + 1) >> 1)])
        


n, k = map(int, input().split())
c, id = 1, list(map(int, input().split()))
while k > c:
    k, c = k - c, c + 1
print(id[k - 1])

import sys
import math
import itertools as it
import operator as op
import fractions as fr


n,k = map(int, sys.stdin.readline().split())
ids = list(map(int, sys.stdin.readline().split()))

p = 1
while k >= p+1:
  k -= p
  p += 1

print(ids[k-1])

def solve(n,k):
    tmp = 0
    i = 0
    while (tmp < k):
        i += 1
        tmp += i
    tmp -= i
    return (k-tmp-1)
    
data = input().split()
data2 = input().split()
ind = solve(int(data[0]), int(data[1]))
print(data2[ind])

n,k = map(int,input().split())
nums = list(map(int,input().split()))
now = 0
i = 0
while 1==1:
    i+=1
    now+=i
    if now>=k:
        now-=i
        k-=now
        break
print(nums[k-1])

import math
n, k = [int(x) for x in input().split()]
ID = [int(x) for x in input().split()]
m = math.floor(((1 + 8*(k-1))**0.5 - 1) / 2)
print(ID[k-1 - m*(m+1)//2])


n, k = list(map(int, input().split()))
xs = list(map(int, input().split()))

i = 0
while k > 0:
    i += 1
    h = k
    k -= i

print(xs[h - 1])


n,k=map(int,input().split())
l=list(map(int,input().split()))
t=0
for i in range(n):
    if t+i+1>=k: break
    else: t+=i+1
print(l[k-t-1])

n, k = list(map(int, input().split()))


a = [int(s) for s in input().split()]

from math import sqrt
from math import ceil

p = ceil((sqrt(1 + 8*k) - 1) / 2)

print(a[k - p*(p-1)//2 - 1])


import math
def __starting_point():
    #n, m = list(map(int, input().split()))
    n, k = list(map(int, input().split()))
    A = list(map(int, input().split()))
    x = int((-1 + math.sqrt(1 + 8 * k)) / 2)
    if k == (1 + x) * x // 2:
        print(A[x - 1])
    else:
        print(A[k - (1 + x) * x // 2 - 1])
    

__starting_point()

s = input().split()
n, k = int(s[0]), int(s[1])

id = list(map(lambda x: int(x), input().split()))

c = 1
d = 1

while c + d <= k:
	c += d
	d += 1

print(id[k-c])

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))

i = 1
while i * (i + 1) < 2 * k:
    i += 1
i -= 1
print(a[k - 1 - i * (i + 1) // 2])


from sys import stdin, stdout
n, k = map(int, stdin.readline().split())
number = [0]
for i in range(n):
    number.append(number[-1] + i + 1)
    if number[-1] >= k:
        ind = i
        cnt = number[-2]
        break
    
values = list(map(int, stdin.readline().split()))
for i in range(ind + 1):
    if cnt + i + 1 == k:
        stdout.write(str(values[i]))
        break

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
i = 1
while k>i:
    k-=i
    i+=1
print(a[k-1])


import math
n, k = list(map(int, input().split()))
lst = list(map(int, input().split()))
l = 1
r = min(2 * (10 ** 9) + 1, n * (n + 1) / 2)
while (r > l):
    m = math.floor((l + r) / 2)
    if (m + 1) / 2 * m < k:
        l = m + 1
    else:
        r = m
print(lst[k  - int(l * (l - 1) / 2) - 1])


n,k=list(map(int,input().split()))
id=[int(i) for i in input().split()]
i=0
s=i*(i+1)//2
while s<=k:
     i+=1
     s=i*(i+1)//2
     
s=(i-1)*i//2

k=k-s
if k==0:
     print(id[i-2])
else:
     print(id[k-1])


n, k = input().split(' ')
n = int(n)
k = int(k)
d = input().split(' ')
i = 0

while True:
	i += 1
	p = int((i) * (i+1) / 2)
	if k <= p :
		print(d[k-(p-i)-1])
		break

read = lambda: list(map(int, input().split()))
n, k = read()
a = list(read())
s = 0
for i in range(n):
    s += i + 1
    if s >= k:
        s -= i + 1
        ind = i
        break
ans = a[k - s - 1]
print(ans)


n, k = list(map(int, input().split()))
arr = list(map(int, input().split()))
ans = n - 1
for i in range(1, n + 1):
    if (1 + i) * i // 2 >= k:
        ans = i - 1
        break
print(arr[k - (1 + ans) * ans // 2 - 1])


n,k=map(int,input().split())
a=list(map(int,input().split()))
b=list()
c=1
d=w=0
for i in range(100000):
    b.append(c)
    if c==k:
        w=i
        break
    elif c>k:
        w=i-1
        break
    d+=1
    c+=d
print(a[k-b[w]])