N = int(eval(input()))

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



count = 0

min = P[0]



for i in range(N):

    if P[i] <= min:

        min = P[i]

        count += 1



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

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



def main():

    count = 0

    min = P[0]

    for i in range(N):

        if P[i] <= min:

            min = P[i]

            count += 1

    print(count)



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

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


def main():
    count = 0
    min = P[0]
    for i in range(N):
        if P[i] <= min:
            min = P[i]
            count += 1
    print(count)


main()

-count = 0 -min = P[0] -for i in range(N): -    if P[i] <= min: -        min = P[i] -        count += 1 -print(count) + + +def main(): +    count = 0 +    min = P[0] +    for i in range(N): +        if P[i] <= min: +            min = P[i] +            count += 1 +    print(count) + + +main()