a = int(eval(input()))

b = [int(i) for i in input().split()]



numbers = 1

for i in range(1, len(b)):

    if b[i] >= max(b[0:i]):

        numbers += 1



print(numbers)
n = int(eval(input()))

mountains = [int(i) for i in input().split()]



res = 0



for i in range(n):

    temp = 1

    for j in range(i):

        if mountains[j] > mountains[i]:

            temp -= 1

            break

    res += temp



print(res)
a = int(eval(input()))
b = [int(i) for i in input().split()]
numbers = 1
for i in range(1, len(b)):
    if b[i] >= max(b[0:i]):
        numbers += 1
print(numbers)

n = int(eval(input()))
mountains = [int(i) for i in input().split()]
res = 0
for i in range(n):
    temp = 1
    for j in range(i):
        if mountains[j] > mountains[i]:
            temp -= 1
            break
    res += temp
print(res)

-a = int(eval(input())) -b = [int(i) for i in input().split()] -numbers = 1 -for i in range(1, len(b)): -    if b[i] >= max(b[0:i]): -        numbers += 1 -print(numbers) +n = int(eval(input())) +mountains = [int(i) for i in input().split()] +res = 0 +for i in range(n): +    temp = 1 +    for j in range(i): +        if mountains[j] > mountains[i]: +            temp -= 1 +            break +    res += temp +print(res)