solve [a, b] = f 0 b $ a : repeat (a-1)
    where f n b xs
            | b > sum (take n xs) = f (n+1) b xs
            | otherwise           = n

main = map read . words <$> getLine >>= print . solve
