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()))
ans = 0

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

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

for i in range(1, n):
    if h[i] > high:
        high = h[i]
    diff = h[i] - high
    if diff >= 0:
        ans += 1
print(ans)

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

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

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

count = 0
done = [0]
for h in Hi:
  done.append(h)
  if h >= max(done):
    count+=1

print(count)

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

Solution (Python):
n, *a = map(int, open(0).read().split())
mx = cnt = 0
for i in a:
  if mx<=i:
    cnt += 1
    mx = i
print(cnt)

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
H = LIST()

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

print(view_hotel)

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

m = 0
ans = 0
for i in h:
    if m <= i:
        ans += 1
        m = i
print(ans)

Solution (Python):
import sys

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

for i in range(n):
  if be<=h[i] and h[0]<=h[i]:
    if becount<=h[i]:
      if h[i]==max(h):
        maxcount-=1
        count+=1
        becount=h[i]
        if maxcount==0:
          print(count)
          sys.exit()
      else:
        count+=1
        becount=h[i]
    else:
      pass
  be=h[i]
  
print(count)

Solution (Python):
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

print(sum(1 for i in range(N) if i == 0 or max(H[:i]) <= H[i]))

Solution (Python):
n = int(input())
x = [int(i) for i in input().split()]
num,ans = 0,0
for i in range(n):
    if num<=x[i]: num,ans = x[i],ans+1
print(ans)

Solution (Python):












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

hight = 0
ans = 0
for i in range(n):
    if arrH[i]>=hight:
        ans +=1
    hight = max(hight,arrH[i])

print(ans)

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

for i in range(N):
    if H[i]>=MAX:
        MAX = H[i]
        cnt += 1

print(cnt)

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

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

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

x = 1
for i in range(1, n):
    f = True
    for j in range(i):
        if hh[j] > hh[i]:
            f = False
            break
    if f:
        x += 1
print(x)

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

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

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

lmx = 0
count = 0
for i in range(n):
    if H[i] >= lmx:
        count += 1
        lmx = H[i]
print(count)

Solution (Python):
n=int(input())
h=[int(i) for i in input().split()]
count=n
for i in reversed(range(1,n)):
    for j in reversed(range(0,i)):
        
        
        if h[i]<h[j]:
            count-=1
            break
print(count)

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

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

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

Solution (Python):
n = int(input())
l_h  = list(map(int,input().split()))
count = 1
a=[]
a.append(l_h[0])
for i in l_h[1:]:
  if i>=max(a):
    count += 1
    a.append(i)
print(count)

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

num = 0
ans = 0

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

print(ans)

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

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

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
max_value=-999
cnt=0
for i in range(n):
  if max_value<=l[i]:
    max_value=max(max_value,l[i])
    cnt+=1
print(cnt)

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

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

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
cnt=1
max_h=-1
for i in range(n-1):
  max_h=max(l[i],max_h)
  if l[i+1]>=max_h:
    cnt+=1
print(cnt)

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

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

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

print(A)

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

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

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

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

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

print(ans)

Solution (Python):
n = int(input())
h = list(map(int, input().split()))
_list = [0] * 100
ans = 0

for i in range(n):
    _list[h[i]-1] += 1
    if sum(_list[h[i]:]) == 0:
        ans += 1

print(ans)

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

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

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

Solution (Python):


N = int(input().strip())
H_list = list(map(int, input().rstrip().split()))


max_H=0
cnt=0
for i in H_list:
    if i >= max_H:
        cnt += 1
        max_H = i

print(cnt)

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

Solution (Python):
def main():
    n = int(input())
    hs = list(map(int, input().split()))
    lower = float("-inf")
    ans = 0
    for h in hs:
        lower = max(lower, h)
        if lower <= h:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

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

for i in range(n):
    if int(a[i])>=s:
        num+=1
        s=int(a[i])
print(num)

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

ans = 0
MAXH = 0
for h in H:
    if h >= MAXH:
        ans += 1
        MAXH = h

print(ans)

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

base=H[0]
count=1

for i in range(1,N):
    if H[i]>=base:
        count+=1
        base=H[i]
print(count)

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

print(ans)

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

Solution (Python):
from fractions import gcd

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

Solution (Python):

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

highest = h[0]
ans = 0

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

print(ans)

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

high = 0
cnt = 0
for mountain in H:
    if high <= mountain:
        high = mountain
        cnt += 1
print(cnt)

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

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

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

Solution (Python):
n = int(input())
H = list(map(int, input().split()))
ans = 1
maxH = H[0]

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

Solution (Python):
n = int(input())
hi = list(map(int,input().split()))
mae = 0
count = 0
for i in hi:
  if i>=mae:
    count += 1
    mae = i
print(count)

Solution (Python):


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

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

count = 0
for i in range(n):
    flag = True
    for j in range(i):
        if h[i] < h[j]:
            flag = False

    if flag:
        count += 1

print(count)

Solution (Python):



'''a,b= map(int,input().split())'''




N=int(input())
li= [int(x) for x in input().split()]
lar=li[0]
ans=1
for i in range(1,N):
  if li[i]>=lar:
    ans+=1
    lar=li[i]
print(ans)

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

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

count = 0

for c in range(N):
    if c == 0:
        H_max = H[c]
        count += 1
    else:
        if H_max <= H[c]:
            H_max = H[c]
            count += 1
        else:
            pass

print(count)

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


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

print(cnt)

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

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

highest = -float("inf")
ans = 0

for h in H:
    if highest <= h:
        highest = h
        ans += 1
print(ans)

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

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

ans = 0
top = H[0]

for i in H:
  if i == top:
    ans += 1
  elif i > top:
    top = i
    ans += 1

print(ans)

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

Solution (Python):
N = int(input())
H_list = list(map(int, input().split()))
H_length = len(H_list)
ans_count = 0

for h_i in range(H_length):
    j_list = [j for j in range(h_i)]
    j_list = sorted(j_list, reverse=True)
    i_e = H_list[h_i]
    if len(j_list)==0:
        ans_count = ans_count + 1
        continue
    is_higher = True
    for h_j in j_list:
        if i_e<H_list[h_j]:
            is_higher = False
    if is_higher:
        ans_count = ans_count + 1

print(ans_count)

Solution (Python):



def main():
  n = int(input())
  Hs = list(map(int, input().split()))
  count = 1
  max= Hs[0]
  for i in range(1, n):
    if max <= Hs[i]:
      count += 1
      max = Hs[i]
  print(count)
  
if __name__=='__main__':
  main()

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

ans = 0
max_height = 0
for h in H:
  if h >= max_height:
    ans += 1
  max_height = max(h, max_height)

print(ans)

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

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

print(ans)

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

print(ans)

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

low = H[0]
count = 1

for i in range(1,N):
  if H[i] >= low:
    count += 1
    low = H[i]
    
print(count)

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

Solution (Python):
n=int(input())
s=list(map(int,input().split()))
cnt=0
tmp=s[0]

for i in range(n):
            if s[i]>=tmp:
                        cnt+=1
                        tmp=s[i]
print(cnt)

Solution (Python):
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//math.factorial(n-r)*math.factorial(r)


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

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

_max = 0
cnt = 0
for i in H:
    if i >= _max:
       cnt += 1
       _max = i

print(cnt)

Solution (Python):
def main():

    N = int(input())

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

    h = H[0]

    max_h = h

    count = 1
    for h in H[1:]:
        if h >= max_h:
            count += 1
        max_h = max(max_h, h)

    print(count)


if __name__ == "__main__":
    main()

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

front=0
max=0
ans = 0
for high in montains:
  if high >= max:
    max = high
    if high >= front:
      ans +=1
  front=high

print(ans)

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

ans=0
last=-1
for tmp in h:
        if last <= tmp:
                ans+=1
                last=tmp
print(ans)

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

ans = N
for i in range(N):
    for j in H[:i]:
        if H[i] < j:
            ans -= 1
            break

print(ans)

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

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

count = 1

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

Solution (Python):
N = int(input())
Height = list(map(int, input().split()))
ans = 1
h_w = Height[0]

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

print(ans)

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

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

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

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

print(c)

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

ans = 0
max_H = 0

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

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

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

print(ans)

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

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

print(count)

Solution (Python):

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

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

Solution (Python):
n = int(input())
Hs = list(map(int, input().split()))
m = -50
cnt = 0

for i in range(n):
    if Hs[i] >= m:
        m = Hs[i]
        cnt += 1
print(cnt)

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

Solution (Python):
_,t=open(0);m=a=0
for h in map(int,t.split()):a+=h>=m;m=max(m,h)
print(a)

Solution (Python):
_, *hs = map(int, open(0).read().split())
cou=1
hm=hs[0]
for h in hs[1:]:
  if hm<=h:
    cou+=1
    hm=h
print(cou)

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

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

ans = 1
max_h = H[0]
for i in range(1, n):
    if H[i] >= max_h:
        ans += 1
    max_h = max(max_h, H[i])
print(ans)

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

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

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

count = 0
mmax = 0

for i in t:
    if mmax <= i:
        mmax = i
        count += 1
print(count)

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

ans = 0
h0 = 0
for h in H:
    if h >= h0 and h >= H[0]:
        ans += 1
        h0 = h
print(ans)

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

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

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

cnt = 0
max = 0
for i in range(N):
    if H[i] >= max:
        max = H[i]
        cnt += 1
    else:
        max = max
        cnt = cnt

print(cnt)

Solution (Python):
import numpy as np

N = int(input())

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

count =0

for i in range(N):
    if i ==0:
        count+=1
        H_max_so_far = H[i]
    else:
        if H[i] >= H_max_so_far:
            count+=1
            H_max_so_far = H[i]
            
print(count)

Solution (Python):

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

for i in reversed(range(1, N)):
    flag = True
    for j in reversed(range(i)):
        if H[j] > H[i]:
            flag = False
            break
    if flag == True:
        ans += 1
        
print(ans)

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
c = 1
s = []
for i in range(1, n):
    s = max(l[:i])
    if l[i] >= s:
        c += 1
print(c)

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

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

Solution (Python):
N=int(input())
h=list(map(int,input().split()))
cnt=1
i=1
while i<N:
    if h[i]>=max(h[:i]):
        cnt+=1
    i+=1
print(cnt)

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

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

Solution (Python):
import sys

def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getlist():
    return list(map(int, input().split()))
import math
import heapq
from collections import defaultdict, Counter, deque
MOD = 10**9 + 7
INF = 10**15

def main():
    n = getN()
    nums = getlist()
    hst = 0
    ans = 0
    for num in nums:
        if num >= hst:
            ans += 1
        hst = max(hst, num)

    print(ans)
if __name__ == '__main__':
    main()

"""
9999
3

2916
"""

Solution (Python):
import sys

inputs = [row.split() for row in sys.stdin.readlines()]

mount_list = inputs[1]
mount_list = [int(height) for height in mount_list]

result_cnt = 0
old_max_height = mount_list[0]
for height in mount_list:
    if old_max_height <= height:
        result_cnt+=1
        old_max_height = max(old_max_height, height)
print(result_cnt)

Solution (Python):
import sys

inputs = [row.split() for row in sys.stdin.readlines()]

mount_list = inputs[1]
mount_list = [int(height) for height in mount_list]

result_cnt = 0
old_max_height = mount_list[0]
for height in mount_list:
    new_max_height = max(old_max_height, height)
    if old_max_height < new_max_height:
        result_cnt+=1
        old_max_height = new_max_height
    elif old_max_height == height:
        result_cnt+=1    
print(result_cnt)

Solution (Python):
n = int(input())
h = list(map(int,input().split()))
flag = 1
cnt = 0
for i in range(n):
    for j in range(i+1):
        if h[i]>=h[j]:
            flag = 1
        else:
            flag = 0
            break
    if flag == 1:
        cnt+=1
print(cnt)

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

Solution (Python):
import sys
n = int(input())
h = list(map(int,input().split()))
cnt = 0
state = 1
for i in range(n):
    for j in range(i+1):
        if h[i]<h[j]:
            state = 0
            break
        else:
            state = 1
    if state == 1:
        cnt+=1
print(cnt)

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

ans = 0
for i in range(N):
    canSee = True
    for j in range(0, i):
        if not H[j]<=H[i]:
            canSee = False
            break
    ans += canSee
print(ans)

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

answer = 0
for i in range(n):
    if H[i] == max(H[:i + 1]):
        answer += 1

print(answer)

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

Solution (Python):
n=int(input())
b=c=0
for h in map(int,input().split()):
  if b<=h:
    b=h
    c+=1
print(c)

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

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

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

ans = 1
o = h[0]
for i in range(1, len(h)):
    o = max(o, h[i])
    if h[i] >= o:
        ans += 1

print(ans)

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

print(len(a))

Solution (Python):



n = int(input())
h = [0] + [int(x) for x in input().split()]
cnt = 0
for i in range(1, len(h)):
    if len([j - h[i] for j in h[:i + 1] if j - h[i] > 0]) == 0:
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())
h=[int(x) for x in input().split()]
count=1
max=h[0]
for i in range(n-1):
    if max <= h[i+1]:
        max=h[i+1]
        count+=1
print(count)

Solution (Python):
def main(n,h):
    count = 1
    height = h[0]
    for i in range(1,len(h)):
        if height <= h[i]:
            count += 1
        height = max(height, h[i])
    print(count)

def resolve():
    n = int(input())
    h = list(map(int, input().split()))
    main(n,h)

resolve()

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

resolve()

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

Solution (Python):
n = int(input())
yama = list(map(int, input().split()))
nishi = yama.pop(0)
ans = 1
for i in yama:
    if i >= nishi:
        nishi = i
        ans += 1
print(ans)

Solution (Python):




def main():
    N = int(input())
    H = list(map(int, input().split()))
    result = H[0]
    count = 0
    for h in H:
        if result <= h:
            count += 1
            result = h
    print(count)


if __name__ == "__main__":
    main()

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

l = [h[0]]
for i in range(1, n):
    if l[-1] <= h[i]:
        l.append(h[i])
        
print(len(l))

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
m=0
c=0
for x in a:
    if m<=x:c+=1
    m=max(m,x)
print(c)

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

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

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

Solution (Python):
n=int(input())
h=[int(e) for e in 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())
h = list(map(int, input().split()))
ans = 0
for i in range(n):
    if h[i] == max(h[:i + 1]):
        ans += 1
print(ans)

Solution (Python):
n = int(input())
h = list(map(int,input().split()))
ans = 0
for i in range(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())
h=list(map(int,input().split()))

cnt=0

for i in range(n):
    if max(h[:i+1]) == h[i]:
        cnt+=1
    else:
        continue

print(cnt)

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

Solution (Python):
def main():
    n = int(input())
    num_list = list(map(int, input().split()))

    ans = 1

    tmp = num_list[0]

    for i in range(1,n):
        if tmp <= num_list[i]:
            ans += 1
            tmp = num_list[i]

    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):

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

res = 0
for i in range(n):
    jud = 1==1
    for j in range(0,i):
        if h[i] < h[j]:
            jud = 1==0
            break
    if jud:
        res += 1
print(res)

Solution (Python):
n = int(input())
h = [int(x) for x in input().split()]

ans = 0
tmp = 0
for i in range(n):
    if max(tmp, h[i]) == h[i]:
        ans += 1
        tmp = h[i]

print(ans)

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

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

t = a[0]
ans = 0
for i in range(n):
    if t > a[i]:
        continue
    else:
        t = a[i]
        ans += 1

print(ans)

Solution (Python):
N = int(input())
*H, = 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())
h = list(map(int, input().split()))

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

print(cnt)