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

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

print(cnt)

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

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

    max_h = max(h[i],max_h)

print(ans)

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

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

print(ans)

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

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

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

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()))
a=0
b=0
for i in range(n):
    if h[i]>=a:
        b+=1
    
        a=h[i]
print(b)

Solution (Python):
import math
import sys
n = int(input())
li = list(map(int, input().split()))
cnt = 0
maximum = 0
for i in li:
    if (maximum <= i):
        cnt += 1
        maximum = i
print(cnt)

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

Solution (Python):


n = int(input())
h = list(int(x) for x in input().split())

ans = 0
tmp = 0
for i in range(n):
    if tmp <= h[i]:
        ans += 1
        tmp = h[i]
    else:
        continue

print(ans)

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

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

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

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

Solution (Python):
import sys


N = int(input())

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



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

Solution (Python):


import sys
import math
import collections
import itertools
INF = 10 ** 13
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def lcm(x, y) : return (x * y) // math.gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def LS() : return input().split()
def RS(N) : return [input() for _ in range(N)]
def LRS(N) : return [input().split() for _ in range(N)]
def PL(L) : print(*L, sep="\n")
def YesNo(B) : print("Yes" if B else "No")
def YESNO(B) : print("YES" if B else "NO")

N = I()
H = LI()

ans = 0
m = H[0]
for h in H:
    m = max(m, h)

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

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

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

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

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

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

for i in range(n):
    for j in range(i):
        if h[i] < h[j]:
            break
        if j == i - 1:
            ans += 1

print(ans)

Solution (Python):
n = int(input())
ls = [int(i) for i in input().split()]
maxx = ls[0]
inns = 0
for i in range(len(ls)):
    if ls[i] >= maxx:
        inns += 1
    if ls[i] > maxx:
        maxx =  ls[i]

print(inns)

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

ans,tmp_max = 1,H[0]

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

print(ans)

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

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

Solution (Python):

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

lead = h[0]
for a in h[1:]:
    if lead <= a:
        lead = a
        count += 1
print(count)

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

Solution (Python):
n, *h = map(int, open(0).read().split())

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

print(cnt)

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
    from math import floor, ceil
    

    
    

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

if __name__ == '__main__':
    main()

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]-h[i-1] >= 0 and max_h <= h[i]:
    ans += 1
  max_h = max(h[i],max_h)
print(ans)

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

lead = H[0]
count = 1

for a in H[1:]:
    if lead <= a:
        lead = a
        count += 1
print(count)

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

for i in range(N):
    if i == 0:
        cnt += 1
    else:
        canview = True
        for j in range(0, i):
            if lst[j] > lst[i]:
                canview = False
        if canview:
            cnt += 1
print(cnt)

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):
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, groupby
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
H = LIST()

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

print(ans)

Solution (Python):

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

count = 1

for i in range(1, len(H)):
    for j in range(i):
        if H[i] < H[j]:
            break
    else:
        count += 1

print(count)

Solution (Python):
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)

Solution (Python):
import sys
readline = sys.stdin.readline

def main():
    N = int(input())
    H = list(map(int, readline().rstrip().split()))
    m = H[0]
    cnt = 1
    for h in H[1:]:
        if h >= m:
            cnt += 1
        m = max(m, h)
    print(cnt)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
H = list(map(int,input().split()))
count = 0
tmp2 = 0
for i in range(N):
  tmp = H.pop(0)
  if(i == 0):
    count += 1
    tmp2 = tmp
  else:
    if(tmp2 <= tmp):
      count += 1
      tmp2 = tmp
print(str(count))

Solution (Python):

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

ans = 1
max = h[0]

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

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

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

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

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

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

maximum = 0
answer = 0
for Hi in H:
    if maximum <= Hi:
        answer += 1
    maximum = max(Hi, maximum)

print(answer)

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

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

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

for i in range(N):
    if h[i]>=max_high:
        max_high=h[i]
        cnt+=1
        
print(cnt)

Solution (Python):
import numpy as np
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  N = int(readline())
  H = list(map(int, readline().split()))
  max_h = 0
  ans = 0
  for i in range(N):
    h = H[i]
    if max(h,max_h) == h:
      max_h = h
      ans += 1
  print(ans)
  
  
  
if __name__ == '__main__':
  main()

Solution (Python):
def main():
    N = int(input())
    M = [int(i) for i in input().split()]
    hm = 0
    count = 0
    for i in range(N):
        if hm <= M[i]:
            hm = M[i]
            count += 1
    print(count)
main()

Solution (Python):
n = int(input())
h = list(map(int, input().split()))
sea = []
mountain = h[0]
for i in range(n):
    if i == 0:
        sea.append(h[0])
    else:
        if h[i] >= mountain and h[i] >= h[0]:
            mountain = h[i]
            sea.append(h[i])
        
print(len(sea))

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

Solution (Python):
N = int(input())
H = list(map(int, input().split()))
while len(H) < N:
    H.append(0)
see = 1
for i in range(1, N):
    tall = True
    for j in range(i):
        if(H[j] > H[i]):
            tall = False
            break
    if tall:
        see += 1
print(see)

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

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

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

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

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

print(ans)

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

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

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

print(cnt)

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

Solution (Python):

import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
H = np.array(lr())
Hmax = np.maximum.accumulate(H)
answer = (H == Hmax).sum()
print(answer)

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

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

Solution (Python):

k = int(input())
numerosStr = input().split()
numeros=[]
certo = True
contador=1
for q in numerosStr:
    numeros.append(int(q))

for i in range(1,len(numeros)):
    certo = True
    for j in range(i):
        if numeros[i] < numeros[j]:
            certo=False
            break
    if certo:
        contador+=1
print(contador)

Solution (Python):

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

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

ans = 0
hight = 0

for i in range(len(H)):
    if hight <= H[i]:
        hight = 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):
    l = h[:i]
    if h[i] >= max(l):
        ans += 1
print(ans)

Solution (Python):
N=int(input())
H=[int(h) for h in input().split()]
top=H[0]
count=0
for t in H:
    if t>=top:
        count+=1
        top=t
    else:
        continue
print(count)

Solution (Python):
lista = []
contador = 0
entrou = 0
nVezes = int(input())
linha = input()
lista = linha.split()
for aux in range(len(lista)):
    for aux2 in range(aux,-1,-1):
        if int(lista[aux]) < int(lista[aux2]):
            entrou = 1
    if entrou == 0:
        contador += 1
    entrou = 0
print(contador)

Solution (Python):
n = int(input())
line = input()
lista = [int(n) for n in line.split()]
pos = 1
can = 0
for l in lista:
    semi_lista = lista.copy()
    semi_lista = semi_lista[0:pos]
    semi_lista.sort()
    step_max = semi_lista[len(semi_lista)-1]
    if l >= step_max:
        can+=1
    pos+=1
print(can)

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

print(c)

Solution (Python):
n = int(input())
pousadas = [int(x) for x in input().split()]
maior = 0
cont = 0
for i in pousadas:
    if (maior - i) <= 0:
        cont += 1
        maior = i
print(cont)

Solution (Python):
line = input()
line = input()
numbers = [int(n) for n in line.split()]
predicted_value = 0
for i in range(len(numbers)):
    is_smaller = False
    for k in range(i):
        if numbers[i] < numbers[k]:
            is_smaller = True
            break
    if not is_smaller:
        predicted_value += 1
print(predicted_value)

Solution (Python):
k = int(input())
line = input()

m = []
am = 1
for n in range(k):
    m.append(int(line.split()[n]))
    if(n==0):
        tallest = m[n]
    if(n>0):
        tallest = max(m[n], tallest)
        coef = m[n] - tallest
        if(coef>=0):
            am+=1
print(am)

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

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

mx = xs[0]
count = 0
for x in xs:
    if x >= mx:
        count += 1
        mx = x

print(count)

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

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()))
MAX = 0
cnt = 0
for i in H:
    if i >= MAX:
        MAX = i
        cnt += 1
print(cnt)

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

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

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

num_of_hotel = 1
idx =1
for i in list_of_heght[1:]:
    tmp = list_of_heght[0:idx]
    if max(tmp) <= i:
        num_of_hotel += 1
    idx += 1
print(num_of_hotel)

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

count = 1
for i in range(1,n):
  subh = sorted(h[0:i+1])
  if h[i]==subh[-1]:
    count += 1
print(count)

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

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

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

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

c = 0
for i in range(N):
  h = H[i]
  T = "Y"
  for j in range(i):
    if h < H[j]:
      T = "N"
  if T == "Y":
    c +=1
print(c)

Solution (Python):
N = int(input())
L = [i for i in map(int,input().split())]
t = 0
res = 0
for i in range(len(L)):
    for j in range(i):
        if L[j] > L[i]:
            t = 1
            break
    if t==0:
        res += 1
    t = 0
print(res)

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

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

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=[int(i) for i in input().split()]
maxh=0
ans=0
for i in range(n):
    if maxh<=h[i]:
        ans+=1
        maxh=h[i]
print(ans)

Solution (Python):
from functools import reduce
n = int(input())
ary1 = list(map(int,input().split()))
print(len(reduce(lambda a, b: a+[b] if a[-1]<= b else a, ary1[1:],[ary1[0]])))

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

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

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

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

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 = ans + 1
 
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]



N = ii()
H = li()

cnt = 0

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

Solution (Python):
n = int(input())
h = list(map(int,input().split()))
m = 0
ans = 0
for i in h:
  ans += (i>=m)
  m = max(m,i)
print(ans)

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

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

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

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

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

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

Solution (Python):
a = int(input())
height_list = input().split()
int_height = []
for i in range(a):
    b = int(height_list[i])
    int_height.append(b)

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


print(count)

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

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

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

Hmax=H[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()))

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

print(ans)

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

Solution (Python):

import sys
input = sys.stdin.readline
import numpy as np









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

ans = 0
highest = 0

for h in H:
    if h >= highest:
        ans += 1
        highest = h

print(ans)

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

Solution (Python):
n = int(input())
lis = list(map(int, input().split()))
ans = 0
m = 0
for i in range(n):
    m = max(m, lis[i])
    if m == lis[i]:
        ans += 1
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):
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    N = int(input())
    H = [0] + input_nums()
    maxh = H[0]
    cnt = 0
    for i in range(1, N+1):
        if maxh <= H[i]:
            maxh = H[i]
            cnt += 1
    print(cnt)

if __name__ == '__main__':
    main()

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

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
h = LI()
ans = 0
for i in range(n):
    for j in range(i):
        if h[i] < h[j]:
            break
    else:
        ans += 1
print(ans)

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

Solution (Python):
import numpy as np
import sys
n = int(input())
h = np.array([int(x) for x in input().split()])
ans = 0
m = h[0]
for i in range(n):
	if m <= h[i]:
		ans += 1
		m = h[i]
print(ans)

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

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

Solution (Python):










"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
 
def main():
  n = int(input())
  H = list(map(int,input().split()))
  cnt = 1
  for i in range(1,n):
    flag = True
    for j in range(0,i+1):
      if H[j] > H[i]:
        
        flag = False
        break
    if flag:cnt+=1
  print(cnt)
if __name__ == '__main__':
  main()

Solution (Python):
N = int(input())
H = [int(h) for h in input().split()]
count = 0
for i in range(N):
    can_see = True
    for j in range(i):
        if H[j] > H[i]:
            can_see = False
            break
    if can_see:
        count += 1

print(count)

Solution (Python):

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

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

Solution (Python):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


if __name__ == '__main__':
    n =int(input())
    a = [int(i) for i in input().split()]
    max = 0
    count =0
    for i in a:
        if max <= i:
            count+=1
            max = i

    print(count)

Solution (Python):
n = int(input())
H = [int(x) for x in input().split()]
m = -1
cc = 0
for h in H:
  cc += (h >= m)
  m = max(h, m)
print(cc)

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

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

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

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

print(ans)

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

count = 0
maximum = 0

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

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()

N = int(input())

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

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

print(ans)

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

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n = ii()
H = iil()
ans = 0
high = H[0]
for item in H:
    if item >= high:
        ans += 1
    high = max(item,high)
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 = count + 1
print(count)

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 = ans + 1

print(ans)

Solution (Python):
import numpy as np

N = int(input())
H = np.array(input().split(), dtype=np.int32)

H_cummax = np.maximum.accumulate(H)
answer = (H_cummax == H).sum()
print(answer)

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

print(ans)

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

maxh = 0
cumH = [0]
for i in range(n):
    maxh = max(maxh, H[i])
    cumH.append(maxh)

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

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

x = H[0]
ma = 0
ct = 0

for Hi in H:
    
    if ma < Hi:
        ma = Hi
    if Hi >= ma:
        ct += 1

print(ct)

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    hs=LIST()
    ct=0
    for i in range(n):
        if max(hs[0:i+1])==hs[i]:
            ct+=1
    print(ct)
if __name__ == '__main__':
    do()