n = int(eval(input()))

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

ans = 1

p_i_1 = [p_n[0]]

m = p_n[0]

for i in range(1, n):

    if m > p_n[i]:

        ans += 1

    m = min(m, p_n[i])

    p_i_1.append(p_n[i])

    if m == 1:

        break

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_n = list(map(int, input().split()))
ans = 1
p_i_1 = [p_n[0]]
m = p_n[0]
for i in range(1, n):
    if m > p_n[i]:
        ans += 1
    m = min(m, p_n[i])
    p_i_1.append(p_n[i])
    if m == 1:
        break
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_n = list(map(int, input().split())) -ans = 1 -p_i_1 = [p_n[0]] -m = p_n[0] -for i in range(1, n): -    if m > p_n[i]: -        ans += 1 -    m = min(m, p_n[i]) -    p_i_1.append(p_n[i]) -    if m == 1: -        break -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]