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 math, heapq
from sys import stdin	
from collections import Counter, defaultdict, deque, namedtuple, OrderedDict
from bisect import bisect_right, bisect_left
from typing import List, DefaultDict
from itertools import permutations, combinations
from copy import deepcopy


class MinStack:

    """
    Minimum Stack implementation
    """

    def __init__(self) -> None:
        self.stack = []
        self.min = [] 
    

    def push(self, val: int) -> None:

        self.stack.append(val)

        if not self.min or val<self.min[-1]:
            self.min.append(val)
        else:
            self.min.append(self.min[-1])
    

    def pop(self) -> any:
        
        if not self.isEmpty():
            popped = self.stack.pop()
            self.min.pop()
            return popped


    def isEmpty(self) -> bool:
        return len(self.stack) > 0
    

    def getMin(self) -> any:
        return self.min[-1] if self.min else None


class MinQueue:

    def __init__(self) -> None:
        self.queue = deque()
    

    def getMin(self):

        if not self.isEmpty():
            return self.queue[0]


    def isEmpty(self) -> bool:
        return len(self.queue) > 0


    def push(self, val: int) -> None:

        while not self.isEmpty() and self.queue[-1] > val:
            self.queue.pop()
        
        self.queue.append(val)
    

    def removeElement(self, element: int) -> any:

        if not self.isEmpty() and self.queue[0] == element:
            self.queue.popleft()
         

class MyHeap(object):
    def __init__(self, initial=None, key=lambda x:x):
        self.key = key
        self.index = 0
        if initial:
            self._data = [(key(item), i, item) for i, item in enumerate(initial)]
            self.index = len(self._data)
            heapq.heapify(self._data)
        else:
            self._data = []

    def push(self, item):
        heapq.heappush(self._data, (self.key(item), self.index, item))
        self.index += 1

    def pop(self):
        return heapq.heappop(self._data)[2]
 
def sieve_of_eratosthenes(n):
    is_prime = [True] * (n+1)
    is_prime[0] = is_prime[1] = False
    for p in range(2, int(n**0.5)+1):
        if is_prime[p]:
            for i in range(p*p, n+1, p):
                is_prime[i] = False
    
    primes = []

    for i in range(2, n+1):
        if is_prime[i]:
            primes.append(i)
    
    return primes


def isPowerOf2(n):

    def log2(x):

        if x == 0:
            return False

        return (math.log10(x)/math.log10(2))


    return math.ceil(log2(n)) == math.floor(log2(n))


def binPowRec(a,b):

    if b == 0:
        return 1
    
    res = binPowRec(a, b//2)
    # If b is odd
    # If b % 2 == 1
    if b % 2:
        return res * res * a
    else:
        return res * res


# pow(a,b) in O(log n)
def binPow(a, b):

    res = 1

    while b > 0:
        # b << 1 = b * 2
        # b >> 1 = b/2
        # If b & 1 = b % 2 
        # If b % 2 == 1
        if b & 1:
            res = res * a

        a = a * a

        # b >> 1  = b//2
        # b >> 2  = b//4
        # b >> 3  = b//8
        # b >> 4  = b//16
        b >>= 1

    return res


def gcd(a: int, b: int) -> int:

    while b > 0:
        a = a % b
        a,b = b, a
    
    return a

def lcm(a: int, b: int) -> int:

    return (a*b)//gcd(a,b)


def binarySearch(arr: List[int], target: int):

    left = 1
    right = len(arr)


    while left <= right:

        mid = (left + right)//2

        curr = arr[mid]

        if curr >= target:
            right = mid - 1
        else:
            left = mid + 1

    return right


def build_sparse_table(arr: List[int]):
    
    N = int(1e5)
    K = int(math.ceil(math.log2(N)))

    lookup = [[0 for _ in range(N)] for _ in range(K)]


    for i in range(N):
        lookup[i][0] = arr[i]
    
    for j in range(1, K+1):

        for i in range(i + (i << j) <= N):
            lookup[i][j] = min(lookup[i][j-1], lookup[i+(1<<(j-1))][j-1])
        

def query(L: int, R: int, lookup: List[int]):

    j = int(math.ceil(math.log2(R-L+1)))
    minimum = min(lookup[L][j], lookup[R-(1<<j)+1][j])
    return minimum


def readarray(typ):
    return list(map(typ, stdin.readline().split()))


def readint():
    return int(input())


n, t = readarray(int)

a = readarray(int)


windowStart, windowSum = 0, 0

ans = 0

for windowEnd in range(n):
    windowSum += a[windowEnd]

    if windowSum <= t:
        ans = max(ans, windowEnd-windowStart+1)

    if windowSum > t:
        windowSum -= a[windowStart]
        windowStart += 1

print(ans)