N = int(eval(input()))

P = list(map(int, input().split()))

cnt = 1

min = P[0]

for i in range(1, N):

  if P[i] <= min:

    min = P[i]

    cnt += 1

print(cnt)
N = int(eval(input()))

P = list(map(int, input().split()))

cnt = 1

min = P[0]

for p in P:

  if p < min:

    min = p

    cnt += 1

print(cnt)
N = int(eval(input()))
P = list(map(int, input().split()))
cnt = 1
min = P[0]
for i in range(1, N):
    if P[i] <= min:
        min = P[i]
        cnt += 1
print(cnt)

N = int(eval(input()))
P = list(map(int, input().split()))
cnt = 1
min = P[0]
for p in P:
    if p < min:
        min = p
        cnt += 1
print(cnt)

-for i in range(1, N): -    if P[i] <= min: -        min = P[i] +for p in P: +    if p < min: +        min = p