N=int(eval(input()))

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

min=10**8

count=0

for i in range(N):

  if P[i]==1:

    print((count+1))

    exit()

  elif min>=P[i]:

    count+=1

    min=P[i]
N=int(eval(input()))

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

num=100000000

ans=0

for i in P:

  if num>i:

    ans+=1

    num=i

print(ans)

    
N = int(eval(input()))
P = list(map(int, input().split()))
min = 10**8
count = 0
for i in range(N):
    if P[i] == 1:
        print((count + 1))
        exit()
    elif min >= P[i]:
        count += 1
        min = P[i]

N = int(eval(input()))
P = list(map(int, input().split()))
num = 100000000
ans = 0
for i in P:
    if num > i:
        ans += 1
        num = i
print(ans)

-min = 10**8 -count = 0 -for i in range(N): -    if P[i] == 1: -        print((count + 1)) -        exit() -    elif min >= P[i]: -        count += 1 -        min = P[i] +num = 100000000 +ans = 0 +for i in P: +    if num > i: +        ans += 1 +        num = i +print(ans)