import Data.Maybe
import Control.Monad
import qualified Data.ByteString.Char8 as C

readInt' = fst.fromJust.C.readInt
readLnInt = map readInt'.C.words<$>C.getLine
readCsInt n = concat<$>replicateM n readLnInt

x ? (a,b) = if x then a else b

main = do
 [n,x] <- readLnInt
 inputs <- readLnInt
 print $ solve (x:inputs)

solve (x:ls) = calc 1 0 x ls

calc ans temp bound (s:ss) = (temp'>bound)?(ans,(null ss)?(ans',calc ans' temp' bound ss)) where
  temp' = temp + s
  ans' = ans + 1
