
import System.IO
import Control.Applicative ((<$>))

axtif :: Int -> Int -> Int -> [Int] -> Int
axtif _ _ c [] = c
axtif b m c (x:xs) | b > x = axtif x m c xs
                   | b < x && m < x - b = axtif b (x-b) 1 xs
                   | b < x && m == x - b = axtif b m (c+1) xs
                   | otherwise = axtif b m c xs

main = do
  s1 <- getLine
  let (num:lim:_) = (\x -> read x :: Int) <$> words s1
  s2 <- getLine
  let towns = read <$> words s2
  (putStrLn . show) $ axtif (head towns) 0 0 (tail towns)