n=int(input())
h=list(map(int, input().split()))
t=1
#print(n)
#print(*h)

if h[0] <= h[1]:
  t+=1
if h[0] <= h[2] and h[1] <= h[2]:
  t+=1
if h[0] <= h[3] and h[1] <= h[3] and h[2] <=h[3]:
  t+=1
if h[0] <= h[4] and h[1] <= h[4] and h[2] <=h[4] and h[3] <= h[4]:
  t+=1
if h[0] <= h[5] and h[1] <= h[5] and h[2] <=h[5] and h[3] <= h[5] and h[4] <= h[5]:
  t+=1
if h[0] <= h[6] and h[1] <= h[6] and h[2] <=h[6] and h[3] <= h[6] and h[4] <= h[6] and h[5] <= h[6]:
  t+=1
if h[0] <= h[7] and h[1] <= h[7] and h[2] <=h[7] and h[3] <= h[7] and h[4] <= h[7] and h[5] <= h[7] and h[6] <= h[7]:
  t+=1
if h[0] <= h[8] and h[1] <= h[8] and h[2] <=h[8] and h[3] <= h[8] and h[4] <= h[8] and h[5] <= h[8] and h[6] <= h[8] and h[7]<=h[8]:
  t+=1
if h[0] <= h[9] and h[1] <= h[9] and h[2] <=h[9] and h[3] <= h[9] and h[4] <= h[9] and h[5] <= h[9] and h[6] <= h[9] and h[7]<=h[9] and h[8]<=h[9]:
  t+=1
if h[0] <= h[10] and h[1] <= h[10] and h[2] <=h[10] and h[3] <= h[10] and h[4] <= h[10] and h[5] <= h[10] and h[6] <= h[10] and h[7]<=h[10] and h[8]<=h[10] and h[9]<=h[10]:
  t+=1
if h[0] <= h[11] and h[1] <= h[11] and h[2] <=h[11] and h[3] <= h[11] and h[4] <= h[11] and h[5] <= h[11] and h[6] <= h[11] and h[7]<=h[11] and h[8]<=h[11] and h[9]<=h[11] and h[10]<=h[11]:
  t+=1
if h[0] <= h[12] and h[1] <= h[12] and h[2] <=h[12] and h[3] <= h[12] and h[4] <= h[12] and h[5] <= h[12] and h[6] <= h[12] and h[7]<=h[12] and h[8]<=h[12] and h[9]<=h[12] and h[10]<=h[12] and h[11]<=h[12]:
  t+=1
if h[0] <= h[13] and h[1] <= h[13] and h[2] <=h[13] and h[3] <= h[13] and h[4] <= h[13] and h[5] <= h[13] and h[6] <= h[13] and h[7]<=h[13] and h[8]<=h[13] and h[9]<=h[13] and h[10]<=h[13] and h[11]<=h[13] and h[12]<=h[13]:
  t+=1
if h[0] <= h[14] and h[1] <= h[14] and h[2] <=h[14] and h[3] <= h[14] and h[4] <= h[14] and h[5] <= h[14] and h[6] <= h[14] and h[7]<=h[14] and h[8]<=h[14] and h[9]<=h[14] and h[10]<=h[14] and h[11]<=h[14] and h[12]<=h[14] and h[13]<=h[14]:
  t+=1
if h[0] <= h[15] and h[1] <= h[15] and h[2] <=h[15] and h[3] <= h[15] and h[4] <= h[15] and h[5] <= h[15] and h[6] <= h[15] and h[7]<=h[15] and h[8]<=h[15] and h[9]<=h[15] and h[10]<=h[15] and h[11]<=h[15] and h[12]<=h[15] and h[13]<=h[15] and h[14]<=h[15]:
  t+=1
if h[0] <= h[16] and h[1] <= h[16] and h[2] <=h[16] and h[3] <= h[16] and h[4] <= h[16] and h[5] <= h[16] and h[6] <= h[16] and h[7]<=h[16] and h[8]<=h[16] and h[9]<=h[16] and h[10]<=h[16] and h[11]<=h[16] and h[12]<=h[16] and h[13]<=h[16] and h[14]<=h[16] and h[15]<=h[16]:
  t+=1
if h[0] <= h[17] and h[1] <= h[17] and h[2] <=h[17] and h[3] <= h[17] and h[4] <= h[17] and h[5] <= h[17] and h[6] <= h[17] and h[7]<=h[17] and h[8]<=h[17] and h[9]<=h[17] and h[10]<=h[17] and h[11]<=h[17] and h[12]<=h[17] and h[13]<=h[17] and h[14]<=h[17] and h[15]<=h[17] and h[16]<=h[17]:
  t+=1
if h[0] <= h[18] and h[1] <= h[18] and h[2] <=h[18] and h[3] <= h[18] and h[4] <= h[18] and h[5] <= h[18] and h[6] <= h[18] and h[7]<=h[18] and h[8]<=h[18] and h[9]<=h[18] and h[10]<=h[18] and h[11]<=h[18] and h[12]<=h[18] and h[13]<=h[18] and h[14]<=h[18] and h[15]<=h[18] and h[16]<=h[18] and h[17]<=h[18]:
  t+=1
if h[0] <= h[19] and h[1] <= h[19] and h[2] <=h[19] and h[3] <= h[19] and h[4] <= h[19] and h[5] <= h[19] and h[6] <= h[19] and h[7]<=h[19] and h[8]<=h[19] and h[9]<=h[19] and h[10]<=h[19] and h[11]<=h[19] and h[12]<=h[19] and h[13]<=h[19] and h[14]<=h[19] and h[15]<=h[19] and h[16]<=h[19] and h[17]<=h[19] and h[18]<=h[19]:
  t+=1

print(t)
