N = int(input()) S = list(map(int, input().split())) res = 0 tmp = 0 for j, y in enumerate(S): tmp = max(tmp, y) if y < tmp: res += 1 print(res)