Problem:
 Score : 200 points    Problem Statement There are N mountains ranging from east to west, and an ocean to the west.  At the top of each mountain, there is an inn. You have decided to choose where to stay from these inns.  The height of the i -th mountain from the west is H_i .  You can certainly see the ocean from the inn at the top of the westmost mountain.  For the inn at the top of the i -th mountain from the west (i = 2, 3, ..., N) , you can see the ocean if and only if H_1 \leq H_i , H_2 \leq H_i , ... , and H_{i-1} \leq H_i .  From how many of these N inns can you see the ocean?      Constraints  All values in input are integers.  1 \leq N \leq 20  1 \leq H_i \leq 100         Input Input is given from Standard Input in the following format:  N  H_1  H_2  ...  H_N       Output Print the number of inns from which you can see the ocean.        Sample Input 1 4
6 5 6 8      Sample Output 1 3  You can see the ocean from the first, third and fourth inns from the west.       Sample Input 2 5
4 5 3 5 4      Sample Output 2 3       Sample Input 3 5
9 5 6 8 4      Sample Output 3 1

Solution (Python):
N = int(input())
H = list(map(int, input().split()))


cnt = 0
for i, n in enumerate(H):
    if all([H[j] <= n for j in range(i)]):
      cnt += 1

print(cnt)

Solution (Python):

n = int(input())
hs = list(map(int, input().split()))
n = 1
for i, h in enumerate(hs, 1):
    if i == 1:
        continue
    is_exist = False
    for j in hs[:i-1]:
        if j > h:
            is_exist = True
            break
    if not is_exist:
        n += 1

print(n)

Solution (Python):
N = int(input())
inputlist = input().split()
H_list = []
for H in inputlist:
    H_list.append(int(H))
    
answer = 0
clearFrag = 0
for i in range(len(H_list)):
    if i == 0:
        answer += 1
    else:
        for prior in range(i):
            if H_list[prior] > H_list[i]:
                break
            else:
                clearFrag += 1
        if clearFrag == i:
            answer += 1
        clearFrag = 0

print(answer)

Solution (Python):
n = input()
ryokan_height_list = list(map(int, input().split()))

c = 0
for i, target in enumerate(ryokan_height_list):
  impediments = [impediment for impediment in ryokan_height_list[:i] if impediment > target]
  if len(impediments) == 0:
     c += 1

print(c)

Solution (Python):
def main():
    N = int(input())
    H = list(map(int, input().split()))

    count = 0
    m = 0
    for h in H:
        if m <= h:
            count += 1
            m = h

    print(count)

main()

Solution (Python):
N = int(input().strip())
arrayH = list(map(int, input().strip().split(' ')))
ans = 1
for i in range(N - 1):
        yn = True
        for j in range(i+1):
                if arrayH[j] > arrayH[i+1]:
                        yn = False
        if yn:
                ans = ans + 1
print(ans)

Solution (Python):
count_mountain=int(input())
top=list(map(int,input().split()))
hardle=0
count=0
for x in top:
    if hardle<=x:
        count+=1
        hardle=x
print(count)

Solution (Python):
N = int(input())
H = list(map(int, input().split()))

count = 0
max = H[0]

for h in H:
    if max <= h:
        max = h
        count += 1

print(count)

Solution (Python):
N = int(input())
H = list(input().split())
num = 0
for A in range(N):
  tf = 1
  if A == 0:
    num+= 1
    continue
  for B in range(A + 1):
    if int(H[A]) < int(H[B]):
      tf = 0
  if tf:
    num += 1
print("{}".format(num))

Solution (Python):


N = int(input())
Hlist = [int(x) for x in input().split()]

count = 0
for i in range (N):
    if Hlist[i] >= max(Hlist[0:i+1]):
        count+= 1

print(count)

Solution (Python):
import numpy as np

n = int(input())
h_list = list(map(int,input().split()))
h = np.array(h_list)

can_see = 1  
for i in range(1, n):
    if not np.any((h > h[i])[:i]):
        can_see+=1

print(can_see)

Solution (Python):
n = int(input())
see = 0
li = list(map(int, input().split()))
M = li[0]

for i in li:
    if M <= i:
        see += 1
        M = i

print(see)

Solution (Python):
N=int(input())
lis=[int(x) for x in input().split()]

sum=1
li=[lis[0]]

for i in range(1,N):
    if lis[i] >= max(li):
        sum=sum+1
    li.append(lis[i])

print(sum)

Solution (Python):
c = int(input())
H = input().split()

count = 1
for i in range(c-1):
  v = True
  for j in range(i+1):
    if int(H[i+1]) < int(H[j]):
      v = False
      break
  if v:
    count += 1
print(count)

Solution (Python):
n = int(input())
h = list(map(int,input().split()))

ans = 0
for i in range(n):
    a = 1
    for j in range(i):
        if h[j] > h[i]:
            a = 0
    ans += a
print(ans)

Solution (Python):
N = int(input())
Mountain = [int(i) for i in input().split()] 

count = 0
height = 0
for i in range(N):
    if height <= Mountain[i]:
        height = Mountain[i]
        count += 1

print(count)

Solution (Python):
line = raw_input()
cases = int(line)

line = raw_input()
heights = list(map(int, line.split(' ')))

currentHeight = 0
cnt = 0
for H in heights:
    if currentHeight <= H:
        cnt += 1
    currentHeight = max(currentHeight, H)

print cnt

Solution (Python):
N=int(input())
A=[int(x) for x in input().split()]

out=0
Max_H=0
for i in range(N):
  if Max_H <= A[i]:
    out+=1
    Max_H=A[i]
    
print(out)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(n):
  f=True
  for j in range(i):
    if a[j] >a[i]:
      f=False
  if f:
    ans+=1
print(ans)

Solution (Python):
n=int(input())
h=[0]*n
count=int(0)
hight=int(0)
s=[int(x)  for x in input().split()]
for i in range(n):
  if s[i]>=hight:
    hight=s[i]
    count +=1
print(int(count))

Solution (Python):
N = int(input().rstrip())

H = [ int(n) for n in input().rstrip().split() ]

C = 0

def Maxmam(H):
    if len(H) > 0:
        M = [i for i, x in enumerate(H) if x == max(H)]
        global C
        C += len(M)

        H = H[:min(M)]
        Maxmam(H)
    else:
        C

Maxmam(H)


print(C)

Solution (Python):
import sys


N = input()
N = int(N)

st = input().split()
H = [ int(x) for x in st]



view = 1


MH = H[0]


for i in range(1,N):
    if H[i] >= MH:
        view += 1
        MH = H[i]

print(view)

Solution (Python):
N = input()
H =  list(map(int, input().split()))

cnt = 0
now = 0

for i in range(len(H)):
    if now <= H[i]:
        now = H[i]
        cnt += 1

print(cnt)

Solution (Python):
n = input()
h = list(map(int,input().split()))

h1 = h[0]

n = 1

max = h1

for i in range(1,len(h)):
	if(max <= h[i]):
		n += 1
		max = h[i]

print(n)

Solution (Python):
import math

N = int(input())
H = list(map(int, input().split()))

view = 1
for i in range(N-1):
  if H[i+1]>=sorted(H[:i+1])[-1]:
    view = view+1
  else:
    continue
print(view)

Solution (Python):
n = int(input())
h = list(map(int, input().split()))
cnt = 1
for i in range(1, len(h)):
    cnt += 1
    for n in range(i):
        if h[i] < h[n]:
            cnt -= 1
            break
            
print(cnt)

Solution (Python):
n=int(input())
m=input().split()
mt=[]
for i in m:
    mt.append(int(i))
good=1
h=mt[0]
for i in range(n-1):
    if mt[i+1]>=h:
        good+=1
        h=mt[i+1]
print(good)

Solution (Python):
N = int(input())
H = list(map(int,input().split()))

count = 0
maxH = 0

for i in H:
    if maxH <= i:
        count += 1
    maxH = max(maxH,i)

print(count)

Solution (Python):
n = int(input())
mountains = list(map(int,input().split(' ')))
maxMount = mountains[0]
count = 0
for height in mountains:
    if maxMount <= height:
        count += 1
        maxMount = height
print(count)

Solution (Python):
def B():
    N = int(input())
    H = [int(i) for i in input().split()]
    if  not len(H) == N:
        exit()
    max_high = max(H)
    max_index = H.index(max_high)

    count = 0
    count += H.count(max_high)

    pmax = H[0]
    for i in range(max_index):
        if pmax <= H[i]:
            pmax = H[i]
            count += 1
        
    print(count)

if __name__ == '__main__':
    B()

Solution (Python):
N=int(input())
h=list(map(int,input().split()))
ans=0
for i in range(N):
  if max(h[:i+1])==h[i]:
    ans+=1
print(ans)

Solution (Python):
N = int(input())

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

ans = 0

for i in range(N):
  if i == 0:
    ans += 1
  else:
    h = H[:i+1]
    if max(h) == H[i]:
      ans += 1
 
print(ans)

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]
sum = 0
max = 0
for i in range(N):
    if A[i] >= max:
      sum += 1
      max = A[i]
      
print(sum)

Solution (Python):
N = int(input())
mountain_height = list(map(int, input().split(" ")))

max_height = 0
ans = 0
for i in range(N):
    if mountain_height[i] >= max_height:
        ans += 1
        max_height = mountain_height[i]
print(ans)

Solution (Python):
N,H = [input() for i in range(2)]
N=int(N)
H=H.split(' ')
for i in range(N):
    H[i]=int(H[i])
cnt = 0

for i in range(N):
    if i == 0:
        cnt += 1
    else:
        flag =  True
        for j in range(i):
            if H[i] < H[j]:
                flag = False
        if flag == True:
            cnt += 1

print(cnt)

Solution (Python):
print((lambda n,a:[all([a[j]<=a[i] for j in range(i)]) for i in range(n)].count(True))(int(input()),list(map(int,input().split()))))

Solution (Python):

N = int(input())


H = [int(i) for i in input().split()] 
result = 0

for index, i in enumerate(H):
    if index - 1 < 0:
        result += 1 
    else:
        flag = 0
        for kindex in range(index):
            if H[kindex] > i:
                flag = 1     
        if flag == 0:
            result += 1
            

print(result)

Solution (Python):
N = int(input())
H = input().split()
h = [int(k) for k in H]
l = []
ans = 1
for i in range(len(H)-1):
  l.append(h[i])
  
  if h[i+1] >= max(l):
    ans += 1
  
print(ans)

Solution (Python):
N=int(input())
H_list=list(map(int, input().split()))
count=0
for i in range(len(H_list)):
  if i==0:
    min_H=H_list[i]
    count=count+1
    continue
  if H_list[i]>=min_H:
    count=count+1
    min_H=H_list[i]

print(count)

Solution (Python):
n = int(input())
h = list(map(int,input().split()))
s = 0
for i in range(n):
    k = 0
    for j in range(i):
        if h[j] <= h[i]:
            k = k + 1
    if k == i:
        s = s + 1           
print(s)

Solution (Python):


n=int(input())
h = list(map(int, input().split()))

ans=1

for i in range(1,len(h)):
  if len(list(filter(lambda x: x <= h[i], h[:i])))==i:
      ans=ans+1
print(ans)

Solution (Python):
N = int(input())
H_li = list(map(int, input().split(' ')))

def check(H):
  H_max = max(H_li)
  max_indexs = ([i for i, x in enumerate(H_li) if x == H_max])

  if len(max_indexs) > 1:
    max_index = max(max_indexs)
    return max_index
  else:
    return max_indexs[0]


max_index = check(H_li)

S = 0

for i in range(max_index):
  num = max_index - i
  try:
    if max(H_li[:num]) <= H_li[num]:
    	S += 1
  except:
    pass
    
print(S+1)

Solution (Python):
N = int(input())
a = []
a = list(map(int, input().split()))
h=a[0]
t=0
for i in range(N):
  if a[i]>=h:
    t+=1
    h=a[i]
print(t)

Solution (Python):
N=int(input())
H_lst=list(map(int,input().split()))
S = H_lst[0]
count = 1
for i in range(N-1):
    if S <= H_lst[i+1]:
        count += 1
        S = H_lst[i+1]
print(count)

Solution (Python):
n = int(input()) 
mountains = list(map(int, input().split()))
maxHeight = 0
x = 0
for h in mountains:
    if h >= maxHeight:
        x += 1
    maxHeight = max(h, maxHeight)
print(x)

Solution (Python):
a = input()
b = list(map(int, input().split(' ')))
res = 0
hikaku_target = 0

for hei in b:
    if hei >= hikaku_target:
        res = res + 1
    hikaku_target = max(hikaku_target, hei)
print(res)

Solution (Python):






n = int(input())
Hs = [int(s) for s in input().split()]

m = -1
count = 0
for h in Hs:
    if h>=m:
        m = h
        count += 1
ans = count
print(ans)

Solution (Python):
def main():
  N=int(input())  
  H=list(map(int, input().split()))  
  
  max_height=H[0]
  count=0
  
  for i in range(N):
    if H[i]>=max_height:
      count=count+1
      max_height=H[i]

  print(count)
    
main()

Solution (Python):
N = int(input())
H = input().split(" ")
count = 0
for i in range(N):
  if i == 0:
    nowTop = H[0]
    count += 1
  else:
    if int(H[i]) >= int(nowTop):
      nowTop = H[i]
      count += 1
      
print(count)

Solution (Python):
n = int(input())
h = [int(i) for i in input().split()]
mx = 0
cnt = 0

for i in range(n):
    if h[i] >= mx :
        mx = h[i]
        cnt += 1

print (cnt)

Solution (Python):
N = input()
Hi = list(map(int, input().split()))
a = Hi[0]
b = 0
c = 0
for i in Hi:
    
    if i >= c:
        b += 1
        c = i
print(b)

Solution (Python):
N = int(input())
list1 = []
list1 = list(map(int, input().split()))
max1 = list1[0]
ans = 0
for i in range(N):
    if list1[i] >= max1:
        ans += 1
        max1 = list1[i]

print(ans)

Solution (Python):
N = int(input())
Hn = list(map(int,input().split()))

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

print(count)

Solution (Python):


if __name__ == "__main__":
    N = int(input())
    tmp = input().split()
    Hs = []
    for t in tmp:
        Hs.append(int(t))
    total = 0

    for n in range(N):
        n_count = 0
        for i in range(0, n):
            if Hs[i] > Hs[n]:
                break
            n_count += 1
        if n_count == n:
            total += 1
        
    print(total)

Solution (Python):
a = int(input())
b = list(map(int,input().split()))
mx = -1
count = 0
for i in range(a):
  if mx > b[i]:
    mx = mx
  else:
    mx = b[i]
    count = count + 1
print(count)

Solution (Python):
N = int(input())
H = list(map(int, input().split(" ")))

cur_max = 0
cnt = 0
for h in H :
    if h >= cur_max :
        cur_max = h
        cnt += 1
        
print(cnt)

Solution (Python):
from sys import stdin

n = stdin.readline().rstrip().split()
h = [int(x) for x in stdin.readline().rstrip().split()]

sum = 0

for k in range(len(h)):
    if k == 0:
        sum += 1
        continue

    for l in range(k):
        if h[k] < h[l]:
            break
    else:
        sum += 1

print(sum)

Solution (Python):
N=int(input())
ta= list(map(int,input().split()))
ans=1
check=0
a=N-2
for i in range(N):
    if(i==0): continue
    for j in range(N-a):
        if(ta[j]<=ta[i]):
            if(j==N-a-1):
                ans+=1
        else:
            check+=1
        if(check==1):
            break
    check=0
    a-=1
print(ans)

Solution (Python):


"""
Created on Tue Feb 26 17:52:43 2019

@author: nakamuratakayuki
"""

N = int(input())
Hlist = list(map(int, input().split()))
c = 1
for i in range(1,N):
    if Hlist[i] >= max(Hlist[:i]):
        c += 1
print(c)

Solution (Python):
N = int(input())
Hs = list(map(int, input().split()))

count = 0

hs_len = len(Hs)
for i, H in enumerate(Hs):
    flag = True
    for j in range(i, -1, -1):
        if Hs[j] > H:
            flag = False
            break

    if flag:
        count += 1

print(count)

Solution (Python):
n = int(input())
hlis = list(map(int, input().split()))
hlis.reverse()

cnt = 0
for i in range(n):
    tmp = "ok"
    for j in range(i+1,n):
        if hlis[i]<hlis[j]:
            tmp = "ng"
    if tmp == "ok":
        cnt = cnt + 1
        
print(cnt)

Solution (Python):
N = int(input())
H = [int(i) for i in input().split()]
top = H[0]
ct = 0
for i in H:
  if top <= i:
    ct += 1
    top = i
print(ct)

Solution (Python):
N=int(input())
H=list(map(int,input().split()))
max=0
sum=0
for i in range(N):
    if H[i]>=max:
        max=H[i]
        sum+=1
print(sum)

Solution (Python):
N = int(input())
H = list(map(int, input().split()))

ans = 0
b = 0
for i in range(N):
    if H[i] >= b:
        ans += 1
        b = H[i]

print(ans)

Solution (Python):

"""
Created on Sat Apr 13 21:23:17 2019

@author: yuta
"""

N = int(input())
H = list(map(int,input().split()))

def main(n,h):
    count = 1
    max_h = h[0]
    for i in range(1,n):
        if h[i] >= max_h:
            max_h = h[i]
            count += 1
    print(count)
main(N,H)

Solution (Python):
N = int(input())
H = [int(x) for x in input().split()]

ans = 1
hmax = H[0]

for i in range(1, N):
    if hmax <= H[i]:
        hmax = H[i]
        ans += 1

print(ans)

Solution (Python):
N = int(input())
H = list(map(int, input().split()))
Hmax = 0
count = 0
for i in range(N):
    if H[i] >= Hmax:
        Hmax = H[i]
        count = count + 1
print(count)

Solution (Python):
n = int(input())
h = list(map(int, input().split()))
max = 0

count = 0
for i in range(len(h)):
    if h[i] >= max:
        count +=1
        max = h[i]
print(count)

Solution (Python):
N = int(input())
H = list(map(int,input().split()))

res=0

Hmax = max(H)
Hmax_idx = 0
localmax=H[0]
for idx,h in enumerate(H):
    if h >= localmax:
        localmax = h
        res+=1
    else:
        continue
    

    if h == Hmax:
        Hmax_idx = idx
        break

if Hmax_idx+1 < N:
    for i in range(idx+1,N):
        if H[i] >= Hmax:
            res+=1

print(res)

Solution (Python):
n = int(input())
h = list(map(int, input().strip().split()))

flg = 0
cnt = 1

for i in range(1,len(h)):
    for j in range(0,i):
        if h[j]>h[i]:
            flg =1
    if flg == 0:
        cnt += 1
    else:
        flg = 0

print(cnt)

Solution (Python):
N = int(input())
H = list(map(int, input().split()))

def ok(H, i):
    for j in range(0,i):
        
        if H[i] < H[j]:
            
            return 0
    return 1

    
cnt = 1
for i in range(1, N):
    cnt += ok(H, i)

print(cnt)

Solution (Python):

import sys



def solve(lines):
    N = int(lines.pop(0))
    H = list(map(int, lines.pop(0).split(' ')))
    maxh = 0
    res = 0
    for r in H:
        if maxh <= r:
            res += 1
            maxh = r
    print(res)

lines = [x.strip() for x in sys.stdin.readlines()]




solve(lines)

Solution (Python):
N=int(input())
H=[int(i) for i in input().split()]
ans=1
for i in range(1,N):
    flag=1
    for j in range(i):
        if H[j]>H[i]:
            flag=0
            break
    if flag==1:
        ans+=1
print(ans)

Solution (Python):
import sys

N = int(input())
H_list = [ i for i in map(int, input().split()) ]
ans = 1

for i in range(1, N):
    for j in range(N):
        if j >= i:
            break
        if H_list[i] < H_list[j]:
            break
        if j == i-1:
            ans += 1

print(ans)

Solution (Python):
n = int(input())
H = list(map(int, input().split()))
hi = 0
ans = 0
for h in H:
    if h >= hi:
        ans += 1
    hi = max(hi, h)
print(ans)

Solution (Python):
import sys

def solve(N, mounts):
    count = 0
    for i in xrange(N):
        max_h = max(mounts[0:i+1])
        if mounts[i] >= max_h:
            count += 1
    return count

if __name__ == '__main__':

    N = sys.stdin.readline().strip()
    mounts = map(int, sys.stdin.readline().strip().split(" "))
    ans = solve(int(N), mounts)
    print ans

Solution (Python):
N = map(int, raw_input().split())
H = map(int, raw_input().split())

currentMax =H.pop(0)
total = 1

for i in H:
    if currentMax > i:
        continue
    currentMax = i
    total += 1

print total

Solution (Python):
n=int(input())
a=input().split()
for j in range(n):
    a[j]=int(a[j])
m=[]
m.append(a[0])
for k in range(n-1):
    x=max(m)
    if x<=a[k+1]:
        m.append(a[k+1])
print(len(m))

Solution (Python):
import sys
input = sys.stdin.readline
n = int(input())
h=list(map(int,input().split()))
ans=1
ma=h[0]
for i in range(1,n):
    if ma <= h[i]:
        ma = h[i]
        ans+=1
print(ans)

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]

v = 0


for i in range(len(l)-1,-1,-1):
    j = 0
    nosee = False 
    for j in range(i):
        if(l[i]<l[j]):
            nosee = True
            break
    if(not(nosee)):
        v+=1
print(v)

Solution (Python):
def checkm(n,mount):
    max = 0
    ans = 0
    for i in mount:
        if max <= i:
            max = i
            ans += 1
    return ans

n = int(input())
mount = input().split()
mount = [int(i) for i in mount]

print(checkm(n,mount))

Solution (Python):
n = int(input())
h = input().split()
H = []
i = 0
while(i < n):
    H.append(int(h[i]))
    i+=1


i = 0
high = 0
num = 0
while(i < n):
    if(H[i] >= high):
        num += 1
    if(high < H[i]):
        high = H[i]
    i += 1

print(num)

Solution (Python):
N = int(input())
list_ = input().split()
K = 1
H = int(list_[0])
for i in range(1,N):
 if int(list_[i]) >= H:
  K += 1
  H = int(list_[i])
print(K)

Solution (Python):
n = int(input())
l = list(map(int, input().split(" ")))

count = 1

for i in range(n):
    if(i == 0):
        continue
    if(max(l[:i+1]) == l[i]):
        count += 1

print(count)

Solution (Python):
n = int(input())
h = list(int(i) for i in input().split())
h.insert(0, 0)
count = 0



for i in range(n+2):
    if 1 < i:
        tmp_list = h[0:i]
        my_hotel = h[i-1]
        if max(tmp_list) <= my_hotel:
            count += 1


print(count)

Solution (Python):
N = int(input())
H = [int(i) for i in input().split()]

ans = 0

count = N - 1
for i in reversed(H):
    flag = 0
    for j in reversed(H[0:count]):
        if i < j:
            flag = 1
            break
    if flag == 0:
        ans += 1
    count -= 1
print(ans)

Solution (Python):
N = int(input())
Hs = input().split(" ")

H = 0
res = 0

for i in range(N):
  if int(H) <= int(Hs[i]):
    res += 1
    H = Hs[i]

print(res)

Solution (Python):

n = int(input())
h= list(map(int, input().split()))
max = h[0]
count = 1

for i in range(1,n):
	if max <= h[i]:
		count = count + 1
		max = h[i]

print(count)

Solution (Python):
N=int(input())
H=list(map(int,input().split()))
H.append(0)
max1=H[0]

X=1
for i in range(N):
    if max1 <= H[i+1]:
        X+=1
        max1=H[i+1]
        
print(X)

Solution (Python):
from sys import stdin

N = int(stdin.readline().rstrip())
H_list = [int(x) for x in stdin.readline().rstrip().split()]

if N == 1:
    print(1)
    exit()

cnt = 1
if H_list[1] >= H_list[0]:
    cnt += 1

for i in range(2, N):
    if H_list[i] >= max(H_list[:i]):
        cnt += 1

print(cnt)

Solution (Python):
n = int(input())
h = list(map(int, input().split()))

count = 0
highest = h[0]

for i in h:
  if highest <= i:
    highest = i
    count += 1

print(count)

Solution (Python):



def main():
    n = int(input())
    height_mountains = [ int(_)  for _ in input().split() ]

    height_highest = 0
    count_see_sun = 0

    for mountain in height_mountains:
        if mountain >= height_highest:
            height_highest = mountain
            count_see_sun += 1

    print(count_see_sun)

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
print(sum(max([0] + a[:i]) <= a[i] for i in range(n)))

Solution (Python):
N = int(input())
Hs = list(map(int, input().split()))
print(len([i for i in range(0, len(Hs)) if all([Hs[j] <= Hs[i] for j in range(0, i)])]))

Solution (Python):
N=int(input())
H=list(map(int,input().split()))
ans=0
for i in range(1,N):
    maxa=max(H[j] for j in range(i))
    if H[i]>=maxa:
        ans+=1
print(ans+1)

Solution (Python):


N = int(input())
H = []
h = input().split()

for i in range(N):
    h_n = int(h[i])
    H.append(h_n)

ans = 1
for j in range(1,N):
    if all([H[j] >= H[k] for k in range(0,j)]):
        ans += 1

print(ans)

Solution (Python):
N = int(input())
H = [int(i) for i in input().split()]
count = 0
for i in range(1, N+1):
    if H[i-1] == max(H[:i]):
        count += 1

print(count)

Solution (Python):
n = int(input())
s = input().split()  

for i in range(n):
    s[i] = int(s[i])

count = 1
biggest = s[0]

for i in range(n-1):
    if(biggest <= s[i+1]):
        count += 1
        biggest = s[i+1]

print(count)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
h = a[0]
count = 0
for i in range(n):
    if h <= a[i]:
        h = a[i]
        count = count + 1
print(count)

Solution (Python):
line = input()
N = int(line)
line = input()
H = list(map(int, line.split()))

count = 1
for index, height in enumerate(H):
    tmp_count = 0
    if index == 0:
        continue
    for i in range(0,index):
        if H[i] > H[index]:
            continue
        tmp_count += 1
    if tmp_count == index:
        count += 1

print(count)

Solution (Python):
hpi = input()
count = 1
k = list(map(int, input().split(" ")))
for c in range(int(hpi) - 1):
  jo = "yes"
  n = k[:c + 2]
  for co in range(len(n) - 1):
    if n[co] > k[c + 1]:
      jo = "no"
    else:
      pass
  if jo == "yes":
    count += 1
print(count)

Solution (Python):


n = int(input())
list = [int(a) for a in input().split()]

counter = 1
for ii in range(1, n):
    flag = 0
    for jj in range(0, ii):
        if list[ii] < list[jj]:
            flag = 1
            break
    if flag == 0:
        counter += 1

print(counter)

Solution (Python):
import math

n=int(input())
A=list(map(int,input().split()))
ans=1
h=A[0]
for i in range(1,n):
  if A[i]>=h:
    ans+=1
    h=A[i]
print(ans)

Solution (Python):
num=int(input())
Hn=input().split()
HMax=0
count=0

for i in range(num):

    if int(Hn[0]) <= int(Hn[i]):
        if HMax   <= int(Hn[i]):
            count += 1
            HMax=int(Hn[i])

print(count)

Solution (Python):
mt_count=int(input())
heights = list(map(int, input().split()))
count = 0

i=1

for i in range(mt_count):
  check_flag = 1
  for j in range(i):
    if heights[j] > heights[i]:
      check_flag = 0
  if check_flag == 1:
    count += 1

print(count)

Solution (Python):
N = int(input())
Hs = map(int, input().split())

count = 0
highest = 0
for H in Hs:
    if H >= highest:
        count += 1
    highest = max(highest, H)

print(count)

Solution (Python):
n = int(input())
h = list(map(int, input().split()))

ans = 1
for i in range(1, n):
    if all(h[j] <= h[i] for j in range(0, i)):
        ans += 1

print(ans)

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

ans = 1
flg = False
for i in range(n):
    for j in range(i):
        if l[i] >= l[j]:
            flg = True
            continue
        else:
            flg = False
            break
    if flg == True: ans += 1  

print(ans)

Solution (Python):
N = int(input())
H = input().split()
H = [int(x) for x in H]

count = 1
max_height = H[0]

for i in range(N-1) :
	if max_height <= H[i+1] :
		count = count + 1
		max_height = H[i+1]

print(count)

Solution (Python):
N = int(input())
H = list(map(int, input().split()))

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

Solution (Python):


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

c=0


for i in range(0,len(a)):
    flag=True
    for j in range(0,i):
        
        if a[j]>a[i]:
            flag=False
    if flag:
        c+=1
print(c)

Solution (Python):
input()
H = list(map(int, input().split()))

count = 1
for i in range(len(H)-1):
  count += 1 if max(H[:i+1])<=H[i+1] else 0
print(count)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()] 
b = a[0]
count =1
for i in range(1,len(a)):
    if a[i] >= b:
        b = a[i]
        count += 1
print(count)

Solution (Python):
N = int(input())
list = list(map(int,input().split()))

cont = 0
for i in range(0,N):
    c = 0
    for j in range(0, i):   
        if list[j] > list[i]:
            c = 1
    if c == 0:
        cont += 1

print(cont)

Solution (Python):
N = int(input())
H = list(map(int,input().split()))
ans = 1
for i in range(1,N):
  flag = 0
  for j in range(i):
    if H[i]<H[j]:
      flag=1
  if flag == 0:
    ans+=1
print(ans)

Solution (Python):
n = int(input())
hlist = list(map(int, input().split()))
h = hlist[0]
m = 1
for i in range(1,n):
	hi = hlist[i]
	if(h <= hi):
		m = m + 1
		h = hi
print(m)

Solution (Python):
n = int(input())
hs = input()
h = [int(j) for j in hs.split(" ")]
count = 0
flg = 0
for i in range(n):
    for j in range(0, i):
        if h[i] < h[j]:
            flg = 1
            break
    if flg == 0:
        count = count + 1
    flg = 0

print(count)

Solution (Python):
import numpy as np
N = int(input())
input_H = input().split()
H = np.empty(N, int)
for i in range(N):
    H[i] = int(input_H[i])

max = H[0]
num = 1
for i in range(1, N):
    if H[i] >= max:
        num += 1
        max = H[i]
print(int(num))

Solution (Python):
n = int(input())
h = list(map(int, input().split()))
c = 1
m = h[0]

for i in range(1, n):
    if h[i] >= m:
        c += 1
        m = h[i]
print(c)

Solution (Python):


import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]


    n = int(lines[0])

    h = [int(e) for e in lines[1].split(" ")]

    return (n, h)


def solve(n, h):

    if debug:
        log("n=%s" % n)
        log("h=%s" % h)
    
    result = 1
    for i in range(1, n):
        count = 0
        for j in range(i):
            if h[j] <= h[i]:
                count = count + 1
            else:
                break
        if count == i:
            result = result + 1
        

    return result


def main():
    

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

Solution (Python):
def main():
    N = int(input())
    H = [int(n) for n in input().split()]

    counter = 0
    for i, h in enumerate(H):
        canView = True
        for j in range(i):
            if H[j] > h:
                canView = False
        if canView:
            counter += 1

    print(counter)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
hlist = [int(_) for _ in input().split()]

base = hlist[0]
result = 0

for h in hlist:
  if base <= h:
    result = result +1
    base = h

print(result)

Solution (Python):
def main():

    N = int(input())
    H = [int(h) for h in input().split()]

    count = 1

    for n in range(1, N):
        flag = True
        for m in range(n):
            if H[m] > H[n]:
                flag = False
        if flag:
            count += 1

    print(count)


main()

Solution (Python):
N = int(input())
H = list(map(int, input().split()))

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
counter = 0
for i in range(n):
    counter += 1
    for j in range(i):
        if a[i] < a[j]:
            counter -= 1
            break
print(counter)

Solution (Python):
input()
a = [int(i) for i in input().split()]

max = -1
ans = 0

for i in a:
  if i >= max:
    max = i
    ans = ans + 1
  
print(ans)

Solution (Python):
N = int(input())
H = list(map(int, input().split()))
count = 0
ans = 0
for i in range(1, N):
  for j in range(i):
    if H[j] <= H[i]:
      count += 1
  if count == i:
    ans += 1
  count = 0
print(ans+1)

Solution (Python):



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

ans = 0

for i in range(len(e)):
    if i==0:
        ans += 1
        continue

    flg = True
    for i2 in range(i+1):
        if e[i2]>e[i]:
            flg = False

    if flg:
        ans += 1

print(ans)

Solution (Python):


N = int(input())

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

num = 1
if N > 2:
    for i in range(1,N):
        cansee = True
        for j in range(i):
            if H[i] < H[j]:
                cansee = False
                break
        if cansee:
            num += 1

print(num)