n,*h=list(map(int,open(0).read().split()));print((sum(h[i]>=max(h[:i]+[0])for i in range(n))))
_,t=open(0);m=a=0

for h in map(int,t.split()):a+=h>=m;m=max(m,h)

print(a)
n, *h = list(map(int, open(0).read().split()))
print((sum(h[i] >= max(h[:i] + [0]) for i in range(n))))

_, t = open(0)
m = a = 0
for h in map(int, t.split()):
    a += h >= m
    m = max(m, h)
print(a)

-n, *h = list(map(int, open(0).read().split())) -print((sum(h[i] >= max(h[:i] + [0]) for i in range(n)))) +_, t = open(0) +m = a = 0 +for h in map(int, t.split()): +    a += h >= m +    m = max(m, h) +print(a)