CodeEff/ECCO huggingface dataset:
# Original solution
n = int(eval(input()))
p = list(map(int, input().split()))
count = 0
for i in range(n):
    for j in range(i+1):
        if p[i] > p[j]:
            break
    else:
        count += 1
print(count)


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

ans = 0

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

print(ans)

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

ans = 1
tmp_min = p[0]

for i in range(1, n):
    if tmp_min >= p[i]:
        tmp_min = p[i]
        ans += 1

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

    print(count)

if __name__ == '__main__':
    main()


# Optimized solution
def main():
    n = int(eval(input()))
    p_list = list(map(int, input().split()))
    count = 1
    tmp_min = p_list[0]
    for i in range(1, len(p_list)):
        tmp_min = min(tmp_min, p_list[i])
        if tmp_min == p_list[i]:
            count += 1

    print(count)

if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))
p = list(map(int,input().split()))

cnt = 0
for i in range(n):
    ok_flag = True
    for j in range(i+1):
        if p[i] > p[j]:
            ok_flag=False
    if ok_flag:
        cnt += 1

print(cnt)

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

cnt = 0
min_1_i = p[0]
for i in range(n):
    min_1_i = min(min_1_i,p[i])
    if p[i] <= min_1_i:
        cnt += 1

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

for i in range(N):
    if x[i]==1:
        count=count+1
        break
    elif x[i]==min(x[0:i+1]):
        count=count+1
print(count)


# Optimized solution
N = int(eval(input()))
x = list(map(int, input().split()))
count=0
min=2000000
for i in range(N):
    if min>=x[i]:
        count=count+1
        min=x[i]
print(count)
# Original solution
N = int(eval(input()))
p = list(map(int,input().split()))

p_temp = float("inf")

ans = N
for i in range(N):
	flag = 0
	for j in range(i):
		if p[j] <= p[i]:
			flag = 1
	ans -= flag
print(ans)

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

p_min = [0]*N

p_min[0] = N+1
for i in range(1,N):
	p_min[i] = min(p[i-1],p_min[i-1])

ans = 0

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

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

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

cnt = 1
m = p[0]

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

# Optimized solution
n = int(eval(input()))
P = list(map(int,input().split()))
ans = 0
mi = P[0]
for i in range(n):
    if P[i] <= mi:
        mi = P[i]
        ans += 1
print(ans)
# Original solution
n,*p=list(map(int,open(0).read().split()))
c=0
for i in range(n):
    if p[i]<=min(p[:i+1]):
        c+=1
print(c)

# Optimized solution
n,*p=list(map(int,open(0).read().split()))
c=0
min_p=p[0]
for i in range(n):
    min_p=min(min_p,p[i])
    if p[i]<=min_p:
        c+=1
print(c)
# Original solution
n = int(eval(input()))
p = list(map(int,input().split()))
c = 0
for i in range(n):
    q = p[0:i+1]
    if min(q) == p[i]:
        c += 1

print(c)

# Optimized solution
n = int(eval(input()))
p = list(map(int,input().split()))
c = 0
m = p[0]
for i in range(n):
    if p[i] <= m :
        m = p[i]
        c += 1
print(c)
# Original solution
n, *ps = list(map(int, open(0).read().split()))
cou = 1
for i, p in enumerate(ps[1:], 2):
  a = sorted(ps[:i])
  if a.index(p)==0:
    cou += 1
print(cou)

# Optimized solution
n, *ps = list(map(int, open(0).read().split()))
mp = ps[0]
cou = 1
for p in ps[1:]:
  if mp > p:
    cou += 1
    mp = p
print(cou)
# Original solution
N = int(eval(input()))
P = list(map(int, input().split()))

count = N

for i in range(N):
    for j in range(i):
        if P[i] > P[j]:
            count -= 1
            break

print(count)

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

count = 0
min_num = 2 * 10**5

for i in range(N):
    if P[i] <= min_num:
        count += 1
        min_num = P[i]

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

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

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

m = P[0] #その時点での最小値
cnt = 1 #P[0]の時点でcnt=1
for i in range(N):
    if P[i] < m:
        m = P[i]
        cnt += 1
print(cnt)
# Original solution
n = int(eval(input()))
list = list(map(int,input().split(" ")))
result = n
for i in range(1,n):
    for j in range(i):
        if list[i] > list[j]:
            result -= 1
            break
print(result)

# Optimized solution
n = int(eval(input()))
list = list(map(int,input().split(" ")))
result = n
tem = list[0]
for i in range(n):
    if tem >= list[i]:
        tem = list[i]
    else:
        result -= 1

print(result)
# Original solution
n = int(eval(input()))
li=list(map(int,input().split()))
count = 0
for i in range(n-1):
  for j in range(n-i-1):
    if (li[n-i-1]>li[n-i-2-j]):
      count+=1
      break
print((n-count))


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

mymin = a[0]
count = 0

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

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

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

for i in p:
    ps.append(i)
    #print(ps)
    if min(ps)>=i:
        ans+=1
        
print(ans)


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

total = 0


for i in range(N):
    if P_i[i] <= min(P_i[0:i + 1]) :
        total += 1


print(total)


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

total = 0

equi = P_i[0]

for i in range(N):
    if equi >= P_i[i]:
        total += 1
        equi = P_i[i]

print(total)
# Original solution
n = int(eval(input()))

l = list(map(int,input().split()))
#print(l)

ans = 0
sv = []
for i in l:
    sv.append(i)
    if i <= min(sv):
        ans += 1

print(ans)

# Optimized solution
n = int(eval(input()))

l = list(map(int,input().split()))
#print(l)

ans = 0
min_ = 999999
for i in l:
    if i <= min_:
        min_ = i
        ans += 1

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

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

# Optimized solution
N = int(eval(input()))
P = list(map(int,input().split()))
ans = 1
small = P[0]
for i in range(1,N):
  if P[i] <= small: 
    ans += 1
    small = P[i]
print(ans)
# Original solution
N = int(eval(input()))
P = [int(p) for p in input().split()]
# 先頭は必ずカウント
count = 1
prev_index = N
for c in range(1, N):
    if P[c] == min(P[:c+1]):
        count += 1
print(count)

# Optimized solution
N = int(eval(input()))
count = 0
min_num = N
for c in input().split():
    p = int(c)
    min_num = min(min_num, p)
    if min_num == p:
        count += 1
print(count)
# Original solution
N = int(eval(input()))
P = [int(x) for x in input().split()]
cnt=1
for i in range(1, N):
    if min(P[:i]) >= P[i]:
        cnt+=1
#         print(i, cnt)
        
print(cnt)

# Optimized solution
N = int(eval(input()))
P = [int(x) for x in input().split()]
cnt=1
tmp=P[0]
for i in range(1, N):
    tmp = min(tmp, P[i-1])
    if tmp >= P[i]:
        cnt+=1
#         print(i, cnt)
        
print(cnt)
# Original solution
N=int(eval(input()))
P=list(map(int,input().split()))
R=[[True for i in range(N)] for j in range(N)]
R1=[False for i in range(N)]

for i in range(N):
  if P[i]<=min(P[:i+1]):
    R[i]=True
  else:
    R[i]=False

print((R.count(True)))

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

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

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

count = 1
result = 1

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

print(result)

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

memory = p[0]
count = 0

for i in p:
  if i <= memory:
    count += 1
    
  if i < memory:
    memory = i

print(count)
# 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 = 1
minp =P[0]
for i in range(1, N):
    if minp >= P[i]:
        cnt += 1
    minp = min(minp, P[i])
print(cnt)
# 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 p[i]<=min(p[0:i]):
      cnt+=1
print(cnt)

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

#2重forループでは重すぎるのでTLEになる。

i=0
while i<N:
    flag=0
    
    for j in range(i):
        #print("iは")
        #print(i)
        #print("jは")
        #print(j)
        if mylist[i]>mylist[j]:
            #一つでも条件満たさないjがあればflagを-1にする
            flag=-1
            break

    if flag==0:
        #flagが0であれば、そのiに対して答えを+1する
        answer+=1
    
    i+=1
        
print(answer)

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

temp=0
answer=0

for i in range(N):
    if i==0:
        answer+=1
        temp=lt[i]
    elif temp>=lt[i]:
        answer+=1
        temp=lt[i]
        
print(answer)
# Original solution
N=int(eval(input()))
P=list(map(int,input().split()))
ans=0
for i,p in enumerate(P,1):
    if min(P[:i])==p:
        ans+=1
print(ans)

# Optimized solution
N=int(eval(input()))
P=list(map(int, input().split()))
ans=0
mv=N
for p in P:
    if p<=mv:
        ans+=1
        mv=p
print(ans)
# Original solution
import sys
input = sys.stdin.readline

N = int(eval(input()))

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

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

# Optimized solution
import sys
input = sys.stdin.readline

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

cnt = 0
min_a  = 10 ** 9
for i in range(N):
  min_a  =  min(min_a,a_list[i])
  if min_a >= a_list[i]:
    cnt += 1
    
print(cnt)
# Original solution
n = int(eval(input()))
num = list(map(int, input().split()))
l = []
l.append(num[0])
count = 1

for i in range(1,n):
  if num[i]<=min(a for a in l):
    count += 1
    l.append(num[i])
  else:
    l.append(num[i])

print(count)

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

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

n = 0
for i in range(N):
  for j in range(0,i+1):
    #print(a[i],end=","),print(a[j])
    if a[i] > a[j]:
      #print("error")
      n += 1
      break

  
print((N-n))

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

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

c = [0] * n

for i in range(n):
    for j in range(i):
        if p[i] > p[j]:
            c[i] = 1
            break

print((c.count(0)))

# Optimized solution
n = int(eval(input()))
p = [int(i) for i in input().split()]
x = p[0]
ans = 0
for i in p:
    if x >= i:
        ans += 1
        x = i
print(ans)
# Original solution
# -*- coding: utf-8 -*-
# C - Low Elements
import  sys

def solve152C(N, plist):
	
	count = 0
	isFound = True
	for i in range(1, N+1):
		for j in range(1, i+1):
			if plist[i-1] > plist[j-1]:
				isFound = False
				break
		if(isFound):
			count += 1
		else:
			isFound = True
					
	print(count)


if __name__ == "__main__":
	N = int(eval(input()))
	plist= list(map(int, input().split()))

	solve152C(N, plist)


# Optimized solution
# -*- coding: utf-8 -*-
# C - Low Elements
import  sys

def solve152C(N, plist):
	
	count = 1
	maxnumber = plist[0]
	minnumber = plist[0]
	isFound = True
	for i in range(2, N+1):
		p = plist[i-1]
		if p < maxnumber and p < minnumber:
			count += 1
		
		if p > maxnumber:
			maxnumber = p
		if p < minnumber:
			minnumber = p
					
	print(count)


if __name__ == "__main__":
	
	N = int(eval(input()))
	plist= list(map(int, input().split()))

	solve152C(N, plist)
# Original solution
# -*- coding: utf-8 -*-

n = int(eval(input()))
pl = list(map(int, input().split()))

ans = 0
for i in range(n):
    mi = min(pl[:i+1])
    if mi == pl[i]:
        ans += 1
print(ans)


# Optimized solution
# -*- coding: utf-8 -*-

n = int(eval(input()))
pl = list(map(int, input().split()))

ans = 0
mi = float('inf')
for p in pl:
	if p<mi:
		ans += 1
	mi = min(mi, p)
print(ans)
# Original solution
N=int(eval(input()))
Nums = list(map(int,input().split()))

M=[]

for i in range(1,N+1):
    tmp_list = Nums[:i]
    M_i = min(tmp_list)

    M.append(M_i)

cnt=0
for j in range(N):
    if Nums[j] ==M[j]:
        cnt+=1

print(cnt)

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

min_value=Nums[0]

cnt=0

for i in range(N):
    min_value = min(min_value,Nums[i])
    
    if Nums[i]<=min_value:
        cnt+=1
    
    

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

# Optimized solution
n=int(eval(input()))
a=list(map(int,input().split()))
m=a[0]
ans=1
for i,z in enumerate(a):
  if i==0:continue
  if z<=m:
    ans+=1
  m=min(m,z)
print(ans)
# Original solution
N = int(eval(input()))
Num = [int(i) for i in input().split()]

Max = Num[0]
Min = Num[0]
cnt  = 1
for i in range(1,N):
    if Num[i] <= Max and  Min>=Num[i] :
        cnt +=1
        
    Max = max(Max,Num[i])
    Min = min(Min,Num[i])
    #print(Max,Min)
print(cnt)


# Optimized solution
def main():
    n = int(eval(input()))
    p = [int(i) for i in input().split()]
    Min = [10**9]
    ans = 0
    for i in range(n):
        Min.append(min(Min[-1],p[i]))
    for i in range(n):
        if Min[i]>p[i]:
            ans += 1
    print(ans)
main()
# Original solution
n=int(eval(input()))
P=list(map(int,input().split()))
ans=0

for i in range(n):
    M=min(P[0:i+1])
    if M==P[i]:
        ans+=1
print(ans)

# Optimized solution
n=int(eval(input()))
P=list(map(int,input().split()))
ans=0
M=P[0]
for i in range(n):
    if M>=P[i]:
        ans+=1
        M=P[i]
print(ans)
# Original solution
N = int(eval(input()))
P = [-1]
P += list(map(int, input().split(' ')))
count = 0
for i in range(1,N+1):
    boolean = True
    if P[i] <= min(P[1:i+1]):
        count += 1
print(count)

# Optimized solution
N = int(eval(input()))
P = [-1]
P += list(map(int, input().split(' ')))
mini = 10 ** 9
count = 0
for i in range(1,N+1):
    if P[i] <= mini:
        mini = P[i]
        count += 1
print(count)
# Original solution
N = int(eval(input()))
P = list(map(int,input().split()))

minp = P[0]
ans = 0

for i in range(N):
    if i != 0:
        minp = min(minp,P[i])
    if minp == P[i]:
        ans += 1

print(ans)


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

minp = P[0]
ans = 0

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

print(ans)
# Original solution
N=int(eval(input()))
P=list(map(int,input().split()))
m=10**9

ans=0
for i in range(N):
    if P[i]<m:
        m=P[i]
        ans+=1
        
print(ans)

# Optimized solution
import sys
input = sys.stdin.readline

def I(): return int(eval(input()))
def MI(): return list(map(int, input().split()))
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N=I()
    P=LI()
    m=P[0]
    cnt=1
    for i in range(1,N):
        if P[i]<m:
            cnt+=1
            m=P[i]
            
    print(cnt)

main()
# Original solution
n  =int(eval(input()))
lis = list(map(int, input().split()))

total = 0
for i in range(n):
    tmp = lis[i]
    flag = 1
    for j in range(i):
        if tmp > lis[j]:
            flag = 0
            break
    if flag:
        total += 1
        
print(total)

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

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

print(ans)

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

print(ans)
# Original solution
N = int(eval(input()))
P = [int(p) for p in input().split()]

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

print(ans)

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

M = N+1
cnt = 0
for p in P:
    if p < M:
        cnt += 1
        M = p

print(cnt)
# Original solution
n = int(eval(input()));
A = list(map(int, input().split()));

ans = 0;

for i in range(len(A)):
  if min(A[:i+1]) == A[i]:
    ans += 1;
  else:
    pass;
  
print(ans);

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

ans = 0;
min_ = 2 * (10 ** 5);

for i in range(n):
  min_ = min(A[i], min_);
  if min_ == A[i]:
    ans += 1;
  else:
    pass;
print(ans);
# Original solution
N = int(eval(input()))
P = list(map(int, input().split()))

memo = [0] * N
memo[0] = 1
for i in range(1, N):
    if P[i] > P[i-1]:
        memo[i] = 0
    elif P[i] == P[i-1]:
        memo[i] = memo[i-1]
    else:
        if P[i] <= min(P[0:i]):
            memo[i] = 1
        else:
            memo[i] = 0
print((sum(memo)))


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

memo = [0] * N
memo[0] = 1
minn = P[0]
for i in range(1, N):
    if P[i] <= minn:
        memo[i] = 1
    else:
        memo[i] = 0
    minn = min(minn, P[i])
print((sum(memo)))
# Original solution
'''
Created on 2020/08/17

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write

  N=int(pin())
  P=list(map(int,pin().split()))
  ans=0
  for i in range(N):
    if min(P[:i+1])==P[i]:
      ans+=1
  print(ans)
  return 

main()

# Optimized solution
'''
Created on 2020/08/17

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write

  N=int(pin())
  P=list(map(int,pin().split()))
  ans=0
  m=P[0]
  for i in range(N):
    if m>=P[i]:
      m=P[i]
      ans+=1
  print(ans)
  return 

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

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

for i in range(len(p)):
    target = p[i]
    flag = True
    if tmp < target:
        tmp = target
        continue
    for j in range(i):
        if p[i] > p[j]:
            flag = False
            break
    if flag:
        count += 1

print(count)

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

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

print(ans)
# Original solution
import copy

N = int(eval(input()))
list = [int(i) for i in input().split()]

count = 0

for j in range(N):
    #print(j)
    #print(list)
    #print("j="+str(j))
    list2 = copy.copy(list)
    #print(list2)
    #print(j)
    del list2[j+1:]
    #print(list2)
    #list2 = sorted(list2)
    #print(list[j])
    if(min(list2) >= list[j]):
        count +=1

print(count)


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

ans = 0
min = list[0]

for j in range(N):
    if (min  >= list[j]):
        ans += 1
        min = list[j]
    else:
        continue

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

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

print(Nmax)



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

Nmax = N
Nmin = P[0]

for i in range(N):
    if P[i] <= Nmin:
        Nmin = P[i]
    else:
        Nmax += -1


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

ans = 0
for i, j in enumerate(p):
    if i == 0:
        ans += 1
        continue
    else:
        if j < min(p[:i]):
            ans += 1
            
print(ans)

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

minval = p[0]
ans = 1
for i in p:
    if i < minval:
        ans += 1
        minval = i

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

c = [1 if p[i] == min(p[:i+1]) else 0 for i in range(n)]
print((sum(c)))


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

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

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

ans = 0

# 処理系
for i in range(n):
    if min(data[:i+1]) == data[i]:
        ans += 1

print(ans)


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

ans = 0

min_ = data[0]
for i in range(n):
    # min_ の更新ができれば ans を更新
    if min_ >= data[i]:
        min_ = data[i]
        ans += 1

print(ans)
# Original solution
N = int(eval(input()))
P = list(map(int, input().split()))
ans = 1
for i in range(1, N):
  flag = 0
  for j in range(i):
    if P[j] < P[i]:
      flag += 1
      break
  if flag == 0:
    ans += 1
print(ans)

# Optimized solution
N = int(eval(input()))
P = list(map(int, input().split()))
ans = 0
minimum = 200001
for p in P:
  if p <= minimum:
    minimum = p
    ans += 1
print(ans)
# Original solution
#!/usr/bin/env python3
n = int(eval(input()))
l = list(map(int, input().split()))
ans = 1
if len(l) == 1:
    print((1))
    exit()
if len(l) > 1 and l[0] >= l[1]:
    ans += 1
for i in range(2, n):
    if min(l[:i]) > l[i]:
        ans += 1
print(ans)


# Optimized solution
#!/usr/bin/env python3
n = int(eval(input()))
l = list(map(int, input().split()))
ans = 1
min_l = l[0]
for i in range(1, n):
    if min_l > l[i]:
        ans += 1
        min_l = l[i]
print(ans)