{-# OPTIONS_GHC -O2 #-}
import Control.Applicative
import Data.List
import qualified Data.ByteString.Char8 as BC
import qualified Data.ByteString as BS
import Data.Maybe (fromJust)

f :: [Int] -> Int
f xs = length $ filter (== True) $ zipWith (==) (zipf xs) (zipf $ tail xs)
    where zipf xs = zipWith (<) xs (tail xs)

main :: IO()
main = interact $ show.f.map read.words.last.lines
