CodeEff/ECCO huggingface dataset:
# Original solution
n = int(eval(input()))
p = list(map(int, input().split()))
ans = 0
d = {}
m = {}
for i in range(n):
  d[i] = p[i]
  m[i] = min(p[:i + 1])
for i in range(n):
  if p[i] == m[i]:
    ans += 1
print(ans)

# Optimized solution
n = int(eval(input()))
p = list(map(int, input().split()))
ans = 1
pmin = p[0]
for i in range(1, n):
  if pmin >= p[i]:
    ans += 1
    pmin = p[i]
print(ans)
# Original solution
n = int(eval(input()))
p = [int(i) for i in input().split()]

count = 0
for i in range(n):
    if p[i] <= min(p[:i+1]):
        count +=1
    else:
        pass
print(count)

# Optimized solution
n = int(eval(input()))
p = [int(i) for i in input().split()]
small = p[0]
count = 0
for i in range(n):
    if p[i] <= small:
        count +=1
    else:
        pass
    small = min(small,p[i])
print(count)
# Original solution
n = int(eval(input()))
p = [int(i) for i in input().split()]
small = p[0]
count = 0
for i in range(n):
    if p[i] <= small:
        count +=1
    else:
        pass
    small = min(small,p[i])
print(count)

# Optimized solution
n = int(eval(input()))
p = [int(i) for i in input().split()]
small = p[0]
count = 0
for i in range(n):
    if small >= p[i]:
        count +=1
    else:
        pass
    small = min(small,p[i])
print(count)
# Original solution
if __name__=="__main__":
    n = int(eval(input()))
    args = input().split()
    p = []
    for i in range(len(args)):
        p.append(int(args[i]))

    cnt = 1
    p_pre = [p[0]]
    for i in range(1,len(args)):
        p_pre.append(p[i])
        if p[i]==min(p_pre):
            cnt += 1

    print(cnt)

# Optimized solution
if __name__=="__main__":
    n = int(eval(input()))
    args = input().split()
    p = []
    for i in range(len(args)):
        p.append(int(args[i]))

    cnt = 1
    p_pre = [p[0]]
    min_p_pre = p[0]
    for i in range(1,len(args)):
        p_pre.append(p[i])
        min_p_pre = min(min_p_pre, p[i])
        if p[i] == min_p_pre:
            cnt += 1

    print(cnt)
# Original solution
n = int(eval(input()))
p = input().split()
p = [int(i) for i in p]

c = 0
for i in range(n):
    for j in range(i):
        if p[i] <= p[j]:
            continue
        else:
            break
    else:
        c += 1

print(c)

# Optimized solution
n = int(eval(input()))
p = [int(i) for i in input().split()]

'''
選んだ数字(iで場所指定)より、左の数字が全て大きい。
'''
c = 0
MIN = p[0]
for i in range(n):
    if p[i] <= MIN:
        c += 1
        MIN = p[i]

print(c)
# Original solution
n=int(eval(input()))
ct=0
p=list(map(int,input().split()))
for i in range(n):
    list1=sorted(p[0:i+1])
    if list1[0]==p[i]:
        ct+=1
print(ct)

# Optimized solution
n=int(eval(input()))
ct=0
p=list(map(int,input().split()))
mn=p[0]
for i in range(1,n):
    if mn>=p[i]:
        ct+=1
        mn=p[i]
print((ct+1))
# Original solution
N=int(eval(input()))
List=list(map(int,input().split()))
ans=0
for i in range(N):
    if min(List[:i+1])==List[i]:
        ans+=1
print(ans)

# Optimized solution
N=int(eval(input()))
ans=0
champ=10**6
for p in list(map(int,input().split())):
    if p<champ:
        ans+=1
        champ=p

print(ans)
# Original solution
N = int(eval(input()))
sta = list(map(int, input().split()))
sta2 = []

count_i = 0
for i in sta:
    sta2.append(i)
    if i <= min(sta2):
        count_i += 1

print(count_i)

# Optimized solution
N = int(eval(input()))
sta = list(map(int, input().split()))
min_i = sta[0]
count_i = 0
for i in sta:
    if min_i > i:
        min_i = i
    if i <= min_i:
        count_i += 1

print(count_i)
# Original solution
import sys
from itertools import accumulate

read = sys.stdin.read

N, *P = list(map(int, read().split()))

p = list(accumulate(P, min))

answer = 0
for i, j in zip(P, p):
    if i <= j:
        answer += 1

print(answer)


# Optimized solution
import sys
from itertools import accumulate

read = sys.stdin.read

N, *P = list(map(int, read().split()))

p = accumulate(P, min)
print((sum(i <= j for i, j in zip(P, p))))
# Original solution
N = int(eval(input()))
P = list(map(int, input().split()))

res = 0
for i in range(len(P)):
    if min(P[:i+1]) == P[i]:
        res += 1

print(res)

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

res = 1

minP = P[0]
for i in range(len(P)-1):
    if minP > P[i+1]:
        minP = P[i+1]
        res += 1

print(res)
# Original solution
n = int(eval(input()))
lis = list(map(int, input().split()))
 
for a, b in enumerate(lis):
    if b != min(lis[:a+1]) :
        n -= 1
print(n)

# Optimized solution
n = int(eval(input()))
lis = list(map(int, input().split()))
inf = 10 ** 15
ans = 0
for i in lis:
    if i < inf:
        ans += 1
        inf = i
print(ans)
# Original solution
n=int(eval(input()))
p=list(map(int,input().split()))

cnt=0

for i in range(n):
    if i == 0:
        cnt += 1
    else:
      if min(p[:i+1]) == p[i]:
          cnt += 1
      else:
        continue

print(cnt)

# Optimized solution
n=int(eval(input()))
p=list(map(int,input().split()))

min=p[0]
cnt=0

for i in range(n):
    if min >= p[i]:
        cnt+=1
        min=p[i]
    else:
        continue
print(cnt)
# Original solution
N=int(eval(input()))
P=list(map(int,input().split()))

cnt=0
for i in range(N):
    if min(P[:i+1])==P[i]:
        cnt+=1

print(cnt)

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

cnt=0
mi=P[0]

for i in range(N):
    if mi>=P[i]:
        cnt+=1
        mi=P[i]
print(cnt)
# Original solution
N = int(eval(input()))
P = list(map(int,input().split()))
Nflag = 0
count = 0
for i in range(N,1,-1):
    for j in range(i-1,0,-1):
        if P[i-1]>P[j-1]:
            Nflag = 1
            break
    if Nflag == 0:
        count+=1
    Nflag = 0
print((count+1))

# Optimized solution
N = int(eval(input()))
P = list(map(int,input().split()))
Nflag = 0
count = 0
tmp = float("inf")
for i in P:
    if i<tmp:
        tmp=i
    else:
        count+=1
print((N-count))
# Original solution
n = int(eval(input()))
li = list(map(int,input().split()))

j = 0

for i in range(1,n+1):
  lii = min(li[0:i])
  if lii == li[i-1]:
    j = j + 1
  if lii == 1:
    break

print(j)

# Optimized solution
n = int(eval(input()))
li = list(map(int,input().split()))

i = 0
j = 0
a = 10**6
for i in range(i,n):
  a = min(a,li[i])
  if a == li[i]:
    j = j + 1

print(j)
# Original solution
n = int(eval(input()))
p = list(map(int, input().split()))
un = []
ans = 0
for i, x in enumerate(p):
    un.append(x)
    if x <= min(un):
        ans += 1        
print(ans)


# Optimized solution
n = int(eval(input()))
ps = list(map(int, input().split()))
m = ps[0]
ans = 0
for p in ps:
    m = min(p, m)
    if p <= m:
        ans += 1        
print(ans)
# Original solution
n=int(eval(input()))
p=list(map(int,input().split()))
cnt=1
for i in range(1,n):
    if p[i]<=min(p[:i]):
        cnt+=1
print(cnt)

# Optimized solution
n=int(eval(input()))
p=list(map(int,input().split()))
cnt=1
a=p[0]
for i in range(1,n):
    if p[i] <= a:
        a = p[i]
        cnt += 1
print(cnt)
# Original solution
N = int(eval(input()))
p = list(map(int,input().split()))

cnt = 0
for n in p:
  i = p.index(n)
  if n == p[0]:
    cnt += 1
  elif min(p[:i]) >= n:
    cnt += 1
print(cnt)

# Optimized solution
N = int(eval(input()))
p = list(map(int,input().split()))

cnt = 0
for n in p:
  if n == p[0]:
    cnt += 1
    min = n
  elif min >= n:
    cnt += 1
    min = n
print(cnt)
# Original solution
N = int(eval(input()))
P = list(map(int, input().split()))


# 最小値更新して越えてたらアウト
resultCount = 0
minNum = P[0]
for i in range(N):
    isMitasu = True
    if i != 0:
        if P[i] > minNum:
            isMitasu = False
        else:
            for j in range(i):
                if P[i] > P[j]:
                    isMitasu = False
                    # 最小値更新
                    if P[i] < minNum:
                        minNum = P[i]
                    break
    if isMitasu:
        resultCount += 1
print(resultCount)

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


# 最小値更新して越えてたらアウト
resultCount = 0
minNum = P[0]
for i in range(N):
    isMitasu = True
    if i != 0:
        if P[i] > minNum:
            isMitasu = False
        else:
            # 最小値更新
            minNum = P[i]
    if isMitasu:
        resultCount += 1
print(resultCount)
# Original solution
N = int(eval(input()))
P = [int(x) for x in input().split()]
Count = 1
for T in range(1,N):
    if P[T]<min(P[:T]):
        Count += 1
print(Count)

# Optimized solution
N = int(eval(input()))
P = [int(x) for x in input().split()]
Count = 1
MIN = P[0]
for T in range(1,N):
    if P[T]<MIN:
        MIN = P[T]
        Count += 1   
print(Count)
# Original solution
N = int(eval(input()))
P = [i for i in map(int, input().split())]

count = 0
for i in range(N):
	flag = 1
	for j in range(i):
		if P[i] <= P[j]:
			flag = 1
		else:
			flag = -1
			break

	if flag == 1:
		count += 1

			
print(count)


# Optimized solution
N = int(eval(input()))
P = [i for i in map(int, input().split())]

"""
count = 0
for i in range(N):
	flag = 1
	for j in range(i):
		if P[i] <= P[j]:
			flag = 1
		else:
			flag = -1
			break

	if flag == 1:
		count += 1

print(count)
"""
count = 0
min_ = P[0]
for p in P:
	if p <= min_:
		count += 1
		min_ = p

print(count)
# Original solution
n = int(eval(input()))
p = list(map(int, input().split()))
c = 1
for i in range(1, n):
    flg = True
    for j in range(0, i):
        if p[j] < p[i]:
            flg = False
            break
    c += 1 if flg else 0
print(c)

# Optimized solution
n = int(eval(input()))
p = list(map(int, input().split()))
m = [p[0]]
c = 1
for i in range(1, n):
    m.append(min(m[i - 1], p[i]))
    if m[i] == p[i]:
        c += 1
print(c)
# Original solution
N = int(eval(input()))
P = list(input().split())

times = 0
min_num = N+1
for i in range(len(P)):
  safe = True
  if min_num < int(P[i]):
    continue
  min_num = int(P[i])
  for j in range(i+1):
    if not int(P[i]) <= int(P[j]):
      safe = False
  if safe:
    times += 1
print(times)

# Optimized solution
N = int(eval(input()))
P = list(input().split())

times = 0
min_num = N+1
for i in range(len(P)):
  safe = True
  if min_num < int(P[i]):
    continue
  min_num = int(P[i])
  times += 1
print(times)
# Original solution
N=int(eval(input()))
P=list(map(int, input().split()))
a=1
b=0
for i in P:
	M=min(P[:a])
	if M==i:
		b+=1
	a+=1
print(b)

# Optimized solution
_ = eval(input())
p = list(map(int, input().split()))
m = float("inf")
c = 0
for i in p:
  c += i <= m
  m = min(m, i)
print(c)
# Original solution
N = int(eval(input()))
p = list(map(int, input().split()))

count = 1

for i in range(1, N):
    if p[i] < min(p[:i]):
        count +=1

print(count)

# Optimized solution
N = int(eval(input()))
p = list(map(int, input().split()))

count = 1
min = p[0]

for i in range(1, N):
    if p[i] < min:
        count +=1
        min = p[i]
    

print(count)
# Original solution
N = int(eval(input()))
p = list(map(int , input().split()))

ret = 1
for i in range(1, len(p)):
    if min(p[:i]) > p[i]:
        ret +=1
print(ret) 

# Optimized solution
N = int(eval(input()))
p = list(map(int , input().split()))

ret = 0
c_min = 2e5

for i in p:
    if c_min >= i:
        c_min = i
        ret+=1
print(ret)
# Original solution
n = eval(input())
p = input().split()
cnt = 0
cn = 0

for i in range(len(p)):
	cn = int(p[i])
	for j in range(i + 1):
		if cn > int(p[j]):
			break
		if i == j:
			cnt += 1

print(cnt)

# Optimized solution
n = eval(input())
p = input().split()
cnt = 0
tmin = 9999999999999999999999999999

for i in range(len(p)):
	tmin = min(tmin,int(p[i]))
	if tmin >= int(p[i]):
		cnt += 1

print(cnt)
# Original solution
#152
def main():
    N = int(eval(input()))
    P = list(map(int,input().split()))
    count = 1
    for i in range(1, N):
        p = P[:i]
        if(min(p)>=P[i]):
            count+=1
    print(count)
main()

# Optimized solution
#152
def main():
    N = int(eval(input()))
    P = list(map(int,input().split()))
    count = 0
    min = 10000000000
    for p in P:
        if(p<=min):
            count+=1
            min=p
    print(count)
main()
# Original solution
c=0
N=int(eval(input()))
L=list(map(int,input().split()))
R=list()
for i in range(N):
  R.append(L[i])
  if min(R)==L[i]:
    c=c+1
print(c)

# Optimized solution
mina=10**11
c=0
N=int(eval(input()))
L=list(map(int,input().split()))
for i in range(N):
  mina=min(mina,L[i])
  if mina==L[i]:
    c=c+1
print(c)
# Original solution
n=int(eval(input()))
p=[int(x) for x in input().split()]
a=1
for i in range(1,n):
  if p[i]<=min(p[:i]):
    a+=1
print(a)    

# Optimized solution
n=int(eval(input()))
p=[int(x) for x in input().split()]
a=1
b=p[0]
for i in range(1,n):
  if p[i-1]<b:
    b=p[i-1]
  if p[i]<=b:
    a+=1
print(a)
# Original solution
# ABC 152 C
si = lambda: eval(input())
ni = lambda: int(eval(input()))
nm = lambda: list(map(int, input().split()))
snm = lambda: list(map(str, input().split()))
nl = lambda: list(map(int, input().split()))
n=ni()
p=nl()
s=[]
ans=0
min_v=10**6
for i in range(n):
    if i==0:
        ans+=1
        s.append(p[i])
        min_v=min(min_v,p[i])
        continue
    if p[i]<=min_v:
        ans+=1
    s.append(p[i])
    min_v=min(min_v,p[i])
print(ans)

# Optimized solution
n=int(eval(input()))
p=list(map(int,input().split()))
min_val=10**18
ans=0
for i in range(n):
  if i==0:
    min_val=p[i]
    ans+=1
    continue
  if min_val>=p[i]:
    min_val=p[i]
    ans+=1
print(ans)
# Original solution
N = int(eval(input()))
P = [int(x) for x in input().split()]
count = 0
check = 0
for i in range(N):
    check = 0
    for j in range(i):
        if P[i] > P[j]:
            check = 1
            break
    if check == 0:
        count += 1

print(count)


# Optimized solution
N = int(eval(input()))
P = [int(x) for x in input().split()]
count = 0
check = 0
min = 10**9
for i in P:
    check = 0
    if min > i:
        min = i
    if i <= min:
        count += 1

print(count)
# Original solution
n = int(eval(input()))
arr = input().split(' ')
arr = [int(i) for i in arr]
count = 0
minimum = arr[0]
for idx in range(n):
  num = arr[idx]
  if num <= minimum:
    minimum = num
    count += 1
print(count)

# Optimized solution
n = int(eval(input()))
arr = input().split(' ')
arr = [int(i) for i in arr]
count = 0
minimum = arr[0]
for num in arr:
  if num <= minimum:
    minimum = num
    count += 1
print(count)
# Original solution
n = int(eval(input()))
arr = input().split(' ')
arr = [int(i) for i in arr]
count = 0
minimum = arr[0]
for num in arr:
  if num <= minimum:
    minimum = num
    count += 1
print(count)

# Optimized solution
import sys
input = sys.stdin.readline
 
n = int(eval(input()))
arr = list(map(int,input().split()))
count = 0
minimum = arr[0]
for num in arr:
  if num <= minimum:
    minimum = num
    count += 1
print(count)
# Original solution
N = int(eval(input()))
P = list(map(int, input().split()))

res = 0
for i in range(N):
  for j in range(i):
    if P[i] <= P[j]:
      continue
    else:
      break
  else:
    res += 1
print(res)

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

res = 1
minp = P[0]
for p in P[1:]:
  if p < minp:
    minp = p
    res += 1
print(res)
# Original solution
n = int(eval(input()))
p = [int(i) for i in input().split()]

ans = 1
tmp = [p[0]]
for i in range(1, n):
    tmp.append(p[i])
    tmp.sort()
    if p[i] <= tmp[0]:
        ans += 1
print(ans)

# Optimized solution
n = int(eval(input()))
p = [int(i) for i in input().split()]

ans = 1
tmp = p[0]
for i in range(1, n):
    if tmp >= p[i]:
        ans += 1
        tmp = p[i]
print(ans)
# Original solution
n = int(eval(input()))
l = list(map(int, input().split()))
s = 0
for i in range(n):
    P = l[i]
    J = l[:i+1]
    if min(J) >= P:
        s += 1
print(s)


# Optimized solution
n = int(eval(input()))
l = list(map(int, input().split()))
s = 0
m = l[0]
for i in range(n):
    if m >= l[i]:
        m = l[i]
        s += 1
print(s)
# Original solution
def main():
    N = int(eval(input()))
    P = tuple(map(int,input().split()))
    a = 0
    for i in range(N):
        hantei = 0
        if i == 0:
            pass
        else:
            if min(P[:i]) < P[i]:
                hantei = 1
        if hantei == 0:
            a += 1
    print(a)
if __name__ == '__main__':
    main()

# Optimized solution
def main():
    N = int(eval(input()))
    P = tuple(map(int,input().split()))
    a = 1
    minP = P[0]
    for i in range(1, N):
        if minP < P[i]:
            pass
        else:
            minP = P[i]
            a += 1
    print(a)
if __name__ == '__main__':
    main()
# Original solution
#C
N = int(eval(input()))
P = list(map(int, input().split()))
ans = 0
 
for i in range(N):
    frag = True
    for j in range(i):
        if P[i] > P[j]:
            frag = False
            break
    if frag == True:
        ans += 1
        
print(ans)

# Optimized solution
#C
N = int(eval(input()))
P = list(map(int, input().split()))
ans = 0
min_num = 10**6

for i in range(N):
    min_num = min(min_num, P[i])
    if min_num >= P[i]:
        ans += 1
        
print(ans)
# Original solution
#C
N = int(eval(input()))
P = list(map(int, input().split()))
ans = 0
min_num = 10**6

for i in range(N):
    min_num = min(min_num, P[i])
    if min_num >= P[i]:
        ans += 1
        
print(ans)

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

min_tmp = N+1
ans = 0

for p in P:
    if min_tmp >= p:
        ans += 1
        min_tmp = p
    else:
        continue

print(ans)
# Original solution
n = int(eval(input()))
P = list(map(int, (input().split())))
count = 1
for i in range (1, n):
    if P[i] <= min(P[:i]):
        count += 1

print(count)

# Optimized solution
n = int(eval(input()))
P = list(map(int, (input().split())))
count = 1
tmp = P[0]
for i in range (1, n):
    if P[i] <= tmp:
        count += 1
        tmp = P[i]
print(count)
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))

ans = 0

for i in range(N):
    count = 0
    tmp = A[i]
    for j in range(i+1):
        if tmp <= A[j]:
            count += 1
        else:
            break

    if count == i+1:
        ans += 1

print(ans)


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

minv = 10 ** 9
ans = 0

for i in P:
    if i < minv:
        ans += 1
        minv = i

print(ans)
# Original solution
n = int(eval(input()))
p = list(map(int,input().split()))

p = [0]+p

ansList =[]
for i in range(1,n+1):
  if min(p[1:i+1])==p[i]:
    ansList.append(p[i])
    
print((len(ansList)))

# Optimized solution
n = int(eval(input()))
p = list(map(int,input().split()))

MIN = 10**10
cnt =0
for i in p:
  if i<=MIN:
    MIN = i
    cnt +=1
print(cnt)
# Original solution
n=int(eval(input()))
p=[int(i) for i in input().split()]
for i in range(n):
    if i!=0:p[i]=min(p[i-1],p[i])
print((len(set(p))))


# Optimized solution
n=int(eval(input()))
p=[int(i) for i in input().split()]
for i in range(1,n):p[i]=min(p[i-1],p[i])
print((len(set(p))))
# Original solution
n=int(eval(input()))
p=[int(i) for i in input().split()]
for i in range(1,n):p[i]=min(p[i-1],p[i])
print((len(set(p))))


# Optimized solution
n=int(eval(input()))
p=list(map(int,input().split()))
for i in range(1,n):p[i]=min(p[i-1],p[i])
print((len(set(p))))
# Original solution
N = int(eval(input()))
P = list(map(int,input().split()))

# for i in range(1,N):
#     # print(P[i],P[i+1])
#     if P[i-1] <= P[i]:
#         print(i+1)
#         exit()

# print(N)

ans = 0

# 各部分列の最小値
minval = max(P)
for i in range(N):
    # arr = P[0],...,P[i]の最小値
    minval = min(minval,P[i])
    arr = P[0:i+1]

    # P[i]が最小値以下なら
    if P[i] <= minval:
        ans += 1
    
print(ans)


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

ans = 0

# 各部分列の最小値
minval = max(P)
# for i in range(N):
for x in P:
    # arr = P[0],...,P[i]の最小値
    minval = min(minval,x)

    # P[i]が最小値以下なら
    if x <= minval:
        ans += 1
    
print(ans)
# Original solution
n = int(eval(input()))
p = list(map(int, input().split()))
ans = 0

for i in range(n):
    minp = min(p[:i + 1])
    if p[i] <= minp:
        ans += 1

print(ans)

# Optimized solution
n = int(eval(input()))
p = list(map(int, input().split()))
ans = 0
minp = p[0]


for i in range(n):
    if p[i] <= minp:
        ans += 1
        minp = p[i]

print(ans)
# Original solution
n = int(eval(input()))
p = list(map(int, input().split()))
ans = 0
minp = p[0]


for i in range(n):
    if p[i] <= minp:
        ans += 1
        minp = p[i]

print(ans)

# Optimized solution
n = int(eval(input()))
p = list(map(int, input().split()))
ans = 0
minp = 200000


for i in p:
    if i <= minp:
        ans += 1
        minp = i

print(ans)
# Original solution
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

def resolve():

    N=int(eval(input()))
    P=list(map(int,input().split()))
    A=[]
    for i in range(N):
        A.append(min(P[:i+1]))
    print((len(set(A))))

resolve()

# Optimized solution
def resolve():

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

resolve()
# Original solution
N = int(eval(input()))
P = list(map(int,input().split()))

con = 0

for i in range(1,N):
  if P[i] <= min(P[:i]):
    con += 1

print((con + 1))

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

inf = 10 ** 9

Q = [inf] * N

m = inf

con = 0

for i in range(0,N):
  if P[i] <= m:
    m = P[i]
  Q[i] = m
  if P[i] <= Q[i]:
    con += 1

print(con)
# Original solution
N = int(eval(input()))
P_list = [int(i) for i in input().split()]

# cnt = 1 # 1件目は必ず合致するので

# for i in range(1,len(P_list)) :
#     pi = P_list[i]
#     is_match = True
#     for j in range(i) : # Pi==Pjは必ず正なのでジャッジ不要
#         pj = P_list[j]
#         if (pi > pj) :
#             is_match = False
#             break
    
#     if (is_match) :
#         cnt += 1

cnt = 1 # 1件目は必ず合致するので
min_map = [P_list[0]]
for i in range(1,len(P_list)) :
    # print(P_list[0:i])
    min_value = min(P_list[0:i])
    min_map.append(min_value)

# print(min_map)
for i in range(1,len(P_list)) :
    if (min_map[i] >= P_list[i]) :
        cnt += 1



print(cnt)

# Optimized solution
N = int(eval(input()))
P_list = [int(i) for i in input().split()]

# cnt = 1 # 1件目は必ず合致するので

# for i in range(1,len(P_list)) :
#     pi = P_list[i]
#     is_match = True
#     for j in range(i) : # Pi==Pjは必ず正なのでジャッジ不要
#         pj = P_list[j]
#         if (pi > pj) :
#             is_match = False
#             break
    
#     if (is_match) :
#         cnt += 1

cnt = 1 # 1件目は必ず合致するので
min_map = [P_list[0]]
min_value = P_list[0]
for i in range(1,len(P_list)) :
    min_value = min(min_value,P_list[i])
    min_map.append(min_value)

# print(min_map)
for i in range(1,len(P_list)) :
    if (min_map[i] >= P_list[i]) :
        cnt += 1



print(cnt)
# Original solution
n=int(eval(input()))
l=list(map(int,input().split()))
f={}
x=1
for i in range(n):
    f[x]=l[i]
    x+=1
    
ans=0   
for i in range(n):
    flag=1
    for j in range(i):
        if l[i]>l[j]:
            flag=0
    if flag:
        ans+=1
        
print(ans)

# Optimized solution
n=int(eval(input()))
l=list(map(int,input().split()))
f={}
x=1
   
ans=n
min=l[0]
c=0
for i in range(n):
    if l[i]<=min:
        #ans+=1
        min=l[i]
    else:
        c+=1
        #print(l[i])
        
    #print(min)
    
print((ans-c))
# Original solution
# ABC 152 C

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

res = 0

for i in range(N):
    if P[i] <= min(P[:i+1]):
        res += 1
    else:
        continue

print(res)

# Optimized solution
# ABC 152 C

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

res = 0
minP = 10 ** 9

for i in range(N):
    if P[i] <= minP:
        res += 1
        minP = P[i]
    else:
        continue

print(res)