#!/bin/bash

if [ -p /dev/stdin ]; then
  a=$(cat -)
else
  echo $@
fi
i=0
n=0
p=0
for j in ${a[@]}; do
  if [ $i -eq 0 ]; then
    let ++i
    continue
  fi
  if [ $j -ge $p ]; then
    p=$j
    let ++n
  fi
done
echo $n