f,c = int(input()),0 r = [f] while True: n = int(input()) if n > r[-1]: c += 1 r += [n] if not n: break print(c)