N = int(eval(input()))

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

cnt = 1

min = A[0]

for i in range(1, N):

  if min > A[i]:

    cnt += 1

    min = A[i]

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

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

cnt = 1

min = A[0]

for a in A:

  if min > a:

    cnt += 1

    min = a

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

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

-for i in range(1, N): -    if min > A[i]: +for a in A: +    if min > a: -        min = A[i] +        min = a