n=int(eval(input()))

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

ans=1

l=[p[0]]

buf=p[0]

for i in range(1,n):

    l.append(p[i])

    if p[i]<=buf:

        ans+=1

        buf=p[i]

print(ans)

n=int(eval(input()))

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

ans=1

now=p[0]

for i in range(1,n):

  if p[i]<now:

    now=p[i]

    ans+=1

print(ans)
n = int(eval(input()))
p = list(map(int, input().split()))
ans = 1
l = [p[0]]
buf = p[0]
for i in range(1, n):
    l.append(p[i])
    if p[i] <= buf:
        ans += 1
        buf = p[i]
print(ans)

n = int(eval(input()))
p = list(map(int, input().split()))
ans = 1
now = p[0]
for i in range(1, n):
    if p[i] < now:
        now = p[i]
        ans += 1
print(ans)

-l = [p[0]] -buf = p[0] +now = p[0] -    l.append(p[i]) -    if p[i] <= buf: +    if p[i] < now: +        now = p[i] -        buf = p[i]