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()))
takasa=0
count=0
for i in range(N):
    if H[i]>=takasa:
        count+=1
    takasa=max(H[i],takasa)
print(count)

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

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

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

i=0
m=0

for h in H:
  if(h>=m):
    i=i+1
    m=h
    
print(i)

Solution (Python):
import numpy as np

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

    kosuu = 1
    for i in range(n):
        if i > 0:
            if h[i]>=h[i-1]:
                if h[i] >= np.max(h[0:i]):
                    kosuu += 1
    print(kosuu)
    
    
if __name__ == '__main__':
    main()

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    N = int(input())
    H = [int(h) for h in input().split()]
    ans = 1
    maxH = H[0]
    for i in range(1, N):
        if H[i] >= maxH:
            ans += 1
            maxH = H[i]
    print(ans)

    return  0

if __name__ == "__main__":
    solve()

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

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

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

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

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

print(ans)

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

Solution (Python):

n = int(input())
H = [int(i) for i in 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, count = 1, 0
for i in range(len(h)-1, 0, -1):
    for j in range(i-1, -1, -1):
        if h[i] >= h[j]:
            count += 1
    if count == i:
        ans += 1
    count = 0
print(ans)

Solution (Python):
n=int(input())
h=[int(i) for i in input().split()]
ans=0
hh=[]
for i in h:
    hh.append(i)
    if i==max(hh):
        ans+=1
print(ans)

Solution (Python):
import sys
N = int(sys.stdin.readline().rstrip())
H = list(map(int, sys.stdin.readline().rstrip().split()))
higest = 0
ans = 0
for h in H:
    if h >= higest:
        ans += 1
        higest = h
print(ans)

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

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

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

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

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

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

    print(ans)


resolve()

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

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

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

Solution (Python):

N = int(input())

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

minHigh = 0
counter = 0
for high in Hn:
    if high >= minHigh:
        counter += 1
        minHigh = high


print(counter)

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

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

Solution (Python):
n=int(input())
hs=list(map(int,input().split()))
a=1
x=hs[0]
for h in hs[1:]:
    if h>=x:
        a+=1
        x=h
print(a)

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

max_height = []

for i in range(N):
  if i == 0:
    max_height.append(H[i])
  else:
    max_height.append(max(max_height[-1], H[i]))
    
ans = 0
    
for i in range(N):
  if H[i] >= max_height[i]:
    ans += 1
    
print(ans)

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

Solution (Python):
N = int(input())
H_s = list(map(int, input().split()))
highest = 0
answer = 0
for H in H_s:
    if H >= highest:
        answer += 1
        highest = H
print(answer)

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

Solution (Python):
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    H = list(map(int, input().split()))
    if N == 1:
        return print(1)
    CNT = 1
    High = H[0]
    for i in range(1,N):
        if H[i] >= High:
            CNT += 1
            High = H[i]
        
    return print(CNT)

if __name__ == '__main__':
    main()

Solution (Python):
def resolve():
    N = int(input())
    H = [int(i) for i in input().split()]
    ans = 0
    maxH = 0
    for i in range(N):
        if H[i] >= maxH:
            ans += 1
            maxH = H[i]
    print(ans)


resolve()

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

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

Solution (Python):

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

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

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

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

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

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

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

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

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

Solution (Python):

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


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

print(ocean_view)

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

now = 0
ans = 0
for h in High:
    if now <= h:
        ans += 1
        now = h
print(ans)

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

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

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

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

m = -1
ans = 0
for i in H:
    if m <= i:
        ans += 1
        m = i

print(ans)

Solution (Python):
n = int(input())
a=list(map(int, input().split()))
count = 0
m = 0
for e in a:
  if e >= m:
    count += 1
    m = e
print(count)

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

ans, max_height = 0, 0

for h in H:
  if h >= max_height:
    ans += 1
    max_height = h
print(ans)

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

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

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    H = lmi()
    cnt = 0
    current_max = -1
    for height in H:
        if height >= current_max:
            cnt += 1
            current_max = height
    print(cnt)


if __name__ == "__main__":
    main()

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

print(ans)

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

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


if __name__ == "__main__":
    main()

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

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

    return ans

if __name__ == '__main__':
    print(q2())

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

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

Solution (Python):
n = int(input())
h = list(map(int, input().split()))
l = [str(h[0])]
for i in h[1:]:
        if i>=int(sorted(l)[-1]):
            i = str(i)
            l.append(i)
print(len(l))

Solution (Python):
import itertools
import math
import fractions
import functools
import copy

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

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

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

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

Solution (Python):






import sys
input = sys.stdin.readline

import math
import bisect
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


def lcm(a, b):
    return a * b // gcd (a, b)


def bit_count(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count





N = inputI()
H = inputIL()

b = 0
c = 0
for h in H:
  if h>= b:
    b= h
    c +=1
    
print(c)

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

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

Solution (Python):
n=int(input())
H=[int(_) for _ in 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()))

import numpy as np

h = np.array(h)

cnt =1
for i in range(1,n):
    
    flg=0
    for j in range(i):

        if h[j]>h[i]:
            flg+=1

    if flg==0:
        cnt+=1


print(cnt)

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

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

if __name__ == '__main__':
    main()

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

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


for i in range(int(n)):
    ok = 0
    if i!=0:
        for j in range(i):

            if h[j]<=h[i]:
                ok +=1
            if ok == i:
                count +=1

print(count)

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

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

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

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

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


n = I()
H = LI()

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

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

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

H = list(input().split())
H = [int(H[i]) for i in range(N)]
count = 1

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

print(count)

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

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

print(count)

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

cnt = 1

for i in range (1, N):
  mieru = True
  for j in range (i):
    
    if H[i] < H[j]:
      mieru = False
      break
      
  if mieru == True:
    cnt += 1
    
print(cnt)

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

cnt = 1

for i in range (1, N):
  mieru = True
  
  for j in range(i):
    if H[i] < H[j]:
      mieru = False
      break
      
  if mieru == True:
    cnt += 1
    
print(cnt)

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

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

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

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):
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right


from functools import reduce
from pprint import pprint

INF = float("inf")

def myinput():
    return map(int,input().split())

def mylistinput(n):
    return [ list(myinput()) for _ in range(n) ]

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

n = int(input())
h = list(myinput())

M = 0
count = 0
for i in range(n):
    if h[i]>=M:
        count += 1
        M = h[i]
    else:
        pass

print(count)

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())
H = [int(i) for i in input().split()]

count = 0
pre_max = 0
for h in H:
    if h >= pre_max:
        count += 1
        pre_max = h
print(count)

Solution (Python):
n,*h=map(int,open(0).read().split());print(sum(max(h[:x+1])==h[x]for x in range(n)))

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

Solution (Python):
import itertools
import math

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

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

print(count)

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

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

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

k = -1
ans = 0
for i in a :
  if (k <= i):
    ans += 1
    k = i
         
print(ans)

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

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

res=0

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

print(res)

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

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

print(ans)

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

print(ans)

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

ans = 1
ch = h[0]
for i in range(1,n):
    if (ch>h[i]):
        continue
    ans += 1
    ch = max(ch,h[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):
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())
    l=list(map(int,input().split()))
    cnt=1
    for i in range(1,n):
        if l[i]==max(l[:i+1]):
            cnt+=1
    print(cnt)
resolve()

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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

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

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

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

Solution (Python):


n = int(input())
h = list(map(int, input().split()))
while True:
    removed = False
    for i in range(1, n):
        if i < len(h) and h[i-1] > h[i]:
            
            removed = True
            h.pop(i)
    if removed == False:
        break
print(len(h))

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    import math
    

    
    

    n = int(input())
    h = list(map(int, input().split()))
    res = 0
    m = 0
    for i in h:
        if i >= m:
            res += 1
            m = max(m, i)
    print(res)

if __name__ == '__main__':
    main()

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

Solution (Python):

n, *h = map(int, open(0).read().split())
m = h[0]
for i in range(n):
    if m > h[i]:
        n -= 1
    m = max(m, h[i])
print(n)

Solution (Python):
n = int(input())
h = list(map(int,input().split()))
a = 0
t = 0
ans = 0
while t < n:
  if a <= h[t]:
    ans += 1
    a = h[t]
  t += 1
print(ans)

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

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

print(cnt)

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

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

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()))
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()))

s = 1

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

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


for i in range(1, N):
  mieru = True
  for j in range (i):
    
   
    if H[i]<H[j]:
     
      mieru = False
      break
  if mieru == True:
    cnt += 1
   
    
print(cnt)

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

print(ans)

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

cnt = 1

for i in range(1, N):
  flag = True
  for h in range(i):
    if H[h] > H[i]:
      flag = False
      break
  if flag:
    cnt += 1

print(cnt)

Solution (Python):
import sys
import math
from collections import Counter
import itertools



def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")



N=II()
H=LI()

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

Solution (Python):
def great_ocean_view(n, hli):

    ans = 0
    hlimax = hli[0]

    for i in hli:
        if hlimax <= i:
            ans += 1
            hlimax = i

    return ans

def main():
    n = int(input())
    hli = list(map(int, input().split()))
    print(great_ocean_view(n, hli))

if __name__ == '__main__':
    main()

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

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

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

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

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

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

print(cnt)

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

cm = arr[0]

for i in range(1,n):
  cm = max(cm,arr[i])
  if arr[i] == cm:ans+=1
    
print(ans)

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

ans = 0
h_max = 0
for h in h_list:
    if h < h_max:
        continue
    ans += 1
    h_max = h
print(ans)

Solution (Python):

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

print(cnt)

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