import Data.List
import Data.Char
import Data.Maybe
import Control.Monad
import qualified Data.ByteString.Char8 as BS8

sol :: Int -> [Int] -> Int
sol m (x:[]) = if m >= x then 1 else 0
sol m (x:xs) = if m >= x then 1 + sol x xs else sol m xs

main :: IO ()
main = do
    n <- fst . fromJust . BS8.readInt <$> BS8.getLine
    p <- unfoldr (BS8.readInt . BS8.dropWhile isSpace) <$> BS8.getLine

    print $ sol n p
