Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can.

But she has some work to do in each of n next days. The number of seconds that Luba has to spend working during i-th day is a_{i}. If some free time remains, she can spend it on reading.

Help Luba to determine the minimum number of day when she finishes reading.

It is guaranteed that the answer doesn't exceed n.

Remember that there are 86400 seconds in a day.


-----Input-----

The first line contains two integers n and t (1 ≤ n ≤ 100, 1 ≤ t ≤ 10^6) — the number of days and the time required to read the book.

The second line contains n integers a_{i} (0 ≤ a_{i} ≤ 86400) — the time Luba has to spend on her work during i-th day.


-----Output-----

Print the minimum day Luba can finish reading the book.

It is guaranteed that answer doesn't exceed n.


-----Examples-----
Input
2 2
86400 86398

Output
2

Input
2 86400
0 86400

Output
1

Difficulty: interview

Starter code:

Solutions:
R=lambda:list(map(int,input().split()))
n,t=R()
a=R()
for i in range(n):
  t-=86400-a[i]
  if t<1:
    print(i+1)
    return


n, t = map(int, input().split())
a = list(map(int, input().split()))
for i in range(1, n + 1):
    t -= 86400 - a[i - 1]
    if (t <= 0):
        print(i)
        break

n, t = list(map(int, input().split()))
a = [86400 - int(x) for x in input().split()]
s = 0
for i in range(n):
    s += a[i]
    if s >= t:
        print(i + 1)
        break


n, t = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
s = 0
for i in range(n):
    s += 86400 - a[i]
    if s >= t:
        print(i + 1)
        break


d=(input().split(' '))
n=int(d[0])
sayfa=int(d[1])
i=0
d=list(map(lambda x:int(x),input().split(' ')))
while sayfa > 0:
    sayfa=sayfa-(86400-d[i])
    i+=1
print(i)

n, t = [int(i) for i in input().split()]
a = [int(j) for j in input().split()]
for i in range(n):
    c = 86400 - a[i]
    t -= c
    if t <= 0:
        print(i + 1)
        break


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

ans = 0
for i in range(n):
    t -= (86400 - a[i])
    if t <= 0:
        ans = i + 1
        break

print(ans)


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


n,t=list(map(int,input().split()))
a=list(map(int,input().split()))
for i in range(n):
    t=t-86400+a[i]
    if t<=0:
        print(i+1)
        break


import sys
n,t=list(map(int,input().split()))
l=list(map(int,input().split()))
sum=0

for i in range(n):
    sum+=86400-l[i]
    if sum>=t:
        print(i+1)
        return



TIME_IN_A_DAY = 86400
n, t = map(int, input().split())
a = list(map(int, input().split()))
for i in range(len(a)):
	if TIME_IN_A_DAY - a[i] >= t:
		print(i + 1)
		break
	t -= (TIME_IN_A_DAY - a[i])

# your code goes here
n,t = input().split()
n = int(n)
t = int(t)
a = list(map(int,input().split()))
count = 0
sum=0
for i in a:
	sum=86400-i
	t-=sum
	count+=1
	if(t<=0):
		print(count)
		break

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


n, t = [int(i) for i in input().split()]
dias = [int(i) for i in input().split()]
qtd = 0
for dia in dias:
    l = 86400 - dia
    t = t - l
    qtd = qtd + 1
    if t <= 0:
        break
print(qtd)


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

days , read = map(int, input().split(' '))
day = 0
schedule = [int(x) for x in input().strip().split(' ')]
 
for s in schedule:
	toread = 86400 - s
	read-=toread
	day+=1
	if read<=0:
		break
print(day)

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

n,t = list(map(int,input().split()))
arr = list(map(int,input().split()))
c =  0 
for i in arr:
	t-= (86400-i)
	c+=1
	if t<=0:
		break
print(c)


n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
for i in range(n):
    t -= 86400 - a[i]
    if t <= 0:
        print(i+1)
        break


n,t=map(int,input().split())
a=list(map(int,input().split()))
ans=0
total=0
for i in range(n):
    total+=86400-a[i]
    ans+=1
    if total>=t:
        break
print(ans)

n, t = [int(i) for i in input().split()]

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

ans = 1
sums = []

for i in a:
    sums.append(86400 - i)
    
while sum(sums[0:ans]) < t:
    ans += 1
    
print(ans)

a=input().split(' ')
n=int(a[0])
t=int(a[1])
a=input().split(' ')
a=[int(i) for i in a]
for i in range(n):
    if t<=0:
        print(i)
        break
    t=t-(86400-a[i])
else:
    print(n)
        


# -*- coding: utf-8 -*-

def f(t, arr):

  mtime = 86400
  
  r = 1
  for x in arr:
    t -= mtime - x
    if t <= 0:
      break
    r += 1

  print(r)


def __starting_point():
  
  n, t = list(map(int, input().split()))
  arr = list(map(int, input().split()))

  # for i in range(n):
  #   list(map(int, input().split()))

  f(t, arr)
__starting_point()

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


n,t=map(int,input().split())
arr=map(int,input().split())

ans=0
for i in arr:
  t-=86400-i
  ans+=1
  if t<=0:
    break
print(ans)