When Valera has got some free time, he goes to the library to read some books. Today he's got *t* free minutes to read. That's why Valera took *n* books in the library and for each book he estimated the time he is going to need to read it. Let's number the books by integers from 1 to *n*. Valera needs *a*<sub class="lower-index">*i*</sub> minutes to read the *i*-th book.

Valera decided to choose an arbitrary book with number *i* and read the books one by one, starting from this book. In other words, he will first read book number *i*, then book number *i* + 1, then book number *i* + 2 and so on. He continues the process until he either runs out of the free time or finishes reading the *n*-th book. Valera reads each book up to the end, that is, he doesn't start reading the book if he doesn't have enough free time to finish reading it. 

Print the maximum number of books Valera can read.
The first line contains two integers *n* and *t* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>; 1 ≤ *t* ≤ 10<sup class="upper-index">9</sup>) — the number of books and the number of free minutes Valera's got. The second line contains a sequence of *n* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">4</sup>), where number *a*<sub class="lower-index">*i*</sub> shows the number of minutes that the boy needs to read the *i*-th book.
import sys
input = sys.stdin.readline
from math import log2,ceil,floor
from collections import Counter,deque

graph = {}
def add_edge(node1,node2):
    if node1 not in graph:
        graph[node1] = []
    if node2 not in graph:
        graph[node2] = []
    graph[node1].append(node2)
    graph[node2].append(node1)

    
def bfs(node,graph):
    q = deque()
    vis = set()
    q.append([node,0])
    vis.add(node)
    leafs = []
    while q:
        a , d = q.popleft()
        for i in graph[a]:
            if i in vis:
                continue
            level = d+1
            vis.add(i)
            if all(ele in vis for ele in graph[i]) :
                leafs.append([level,i])
            q.append([i,level])
    return leafs

def mergeDictionary(dict_1, dict_2):
   dict_3 = {**dict_1, **dict_2}
   for key, value in dict_3.items():
       if key in dict_1 and key in dict_2:
               dict_3[key] = value + dict_1[key]
   return dict_3
   
def rindex(lst, value):
    lst.reverse()
    i = lst.index(value)
    lst.reverse()
    return len(lst) - i - 1
    
def mex(arr, N):

    # Sort the array
    arr1 = arr.copy()
    arr1.sort()
    
    mex = 0
    for idx in range(N):
        if arr1[idx] == mex:

            # Increment mex
            mex += 1

    # return mex as answer
    return mex


def fill_prefix_sum(arr, length_arr, prefix_sum):
    prefix_sum[0] = arr[0] 

    for i in range(1, length_arr): # 1, 2, 3, 4
        prefix_sum[i] =  prefix_sum[i-1]+ arr[i]
        
def fill_suffix_sum(arr, length_arr, suffix_sum):
    suffix_sum[length_arr-1] = arr[length_arr-1] 

    for i in reversed(range(length_arr-1)): # 3, 2, 1, 0
        suffix_sum[i] = suffix_sum[i+1] + arr[i]
def f(a,b):
    if b < -1:
        return 9999999
    if a ==b:
        return 0
    elif b < a:
        return a-b
    elif b%2 == 0:
        return 1 +f(a,b//2) 
    else:
        return 2 + f(a,(b+1)//2)
    
mod = 998244353
stop_reading_my_code = 1
for _ in range(stop_reading_my_code):
    graph = {}
    #n = int(input())
    n,t = list(map(int,input().strip().split()))
    arr = list(map(int,input().strip().split()))
    ans = 0
    remove= 0
    sums = []
    flag = 0
    for i in arr:
        flag += 1
        t -= i
        if t < 0:
            sums.append(ans)
            t  = t + arr[remove]
            remove += 1
            continue
        elif flag == len(arr):
            ans +=1
            sums.append(ans)
        ans+=1
    print(max(sums))
        