(defn main-abc124-B []
  (let [N (read)
        xs (doall (take N (repeatedly read)))]
    (loop [m (first xs)
           count 0
           [x & xs] xs]
      (cond (not x) (println count)
            :else (recur (max m x) (if (<= m x) (inc count) count) xs)))))
(main-abc124-B)