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()))
count=0
for i in range(n):
  check=True
  for j in range(i):
    if h[j]>h[i]:
      check=False
  if check:
    count+=1
print(count)

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

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

cnt = 1

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

print(cnt)

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

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

result = 0
for i, x in enumerate(a):
  flg = True
  
  for c in a[:i]:
    flg = flg and c <= x
  
  if flg:
    result += 1

print(result)

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

cn = 1
L = []

for i in range(N):
    if i == 0:
        L.append(H[i])
    else:
        if max(L) <= H[i]:
            cn = cn + 1
            L.append(H[i])

print(cn)

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

ans = 0
highest = 0
for height in h:
    highest = max(height, highest)
    if height >= highest:
        ans += 1

print(ans)

Solution (Python):
import math


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

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


if __name__ == '__main__':
    main()

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

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

ans = 0

for i in range(n):
    h_list = h[0:i+1]
    highest = max(h_list)
    if highest <= h[i]:
        ans = ans + 1

print(ans)

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

count = 1
max_height = height[0]

for i in range(1, N):
    if height[i] >= max_height:
        max_height = height[i]
        count += 1

print(count)

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

count = 0
max_val = 0
for x in h:
    if max_val <= x:
        count += 1
        max_val = x
print(count)

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

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

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

ans = 0
highest = 0
for i in h:
    if highest <= i:
        ans += 1
        highest = i

print(ans)

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

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

Solution (Python):
from sys import stdin
input = lambda: stdin.readline().rstrip()
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())
L = list(map(int,input().split()))
m = 0
cnt = 0
for l in L:
  if m <= l:
    m = l
    cnt += 1
print(cnt)

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

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

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

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

print(count)

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

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

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

print(kei)

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

max = h[0]
count = 0
for i in h:
    if max <= i:
        count += 1
        max = i
    else:
        continue
print(count)

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

Solution (Python):


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

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

Solution (Python):
N= int(input())
A =list(map(int,input().rstrip().split(" ")))
ma = 0
ans = 0
for i in A:
    if i >= ma:
        ans += 1
        ma = i
print(ans)

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

cnt = 0
max_ = 0
for h in H:
    if h >= max_:
        cnt += 1
        max_ = h

print(cnt)

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
from heapq import heapify, heappop, heappush
import math
import random
import string
from copy import deepcopy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7





N = getN()
H = getList()
imos = deepcopy(H)
for i in range(1, N):
    imos[i] = max(imos[i - 1], H[i])

ans = 1 

for i in range(1, N):
    if H[i] >= imos[i - 1]:
        ans += 1
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]:
            ans -= 1
            break
    ans += 1
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[i] >= max :
        max = h[i]
        ans += 1
print(ans)

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

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

Solution (Python):
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def calc(i, h):
    return all(h[i] >= h[j] for j in range(i))


def main():
    n = int(input())
    h = Input()
    ans = 1
    for i in range(1, n):
        ans += calc(i, h)
    print(ans)


main()

Solution (Python):
def main():
    n = int(input())
    h_list = list(map(int, input().split()))
    highest = 0
    cnt = 0

    for h in h_list:
        if highest <= h:
            highest = h
            cnt += 1

    print(cnt)


if __name__ == "__main__":
    main()

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

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

Solution (Python):


num = int(input())
str = input().split()
table = [int(i) for i in str]
count = 1
maxi = table[0]
pointed = table[0]
for i in range(1, num):
    if maxi <= table[i]:
        maxi = table[i]
        count += 1
print(count)

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

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

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

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


if __name__ == '__main__':
    main()

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


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys


def input():
    return sys.stdin.readline().rstrip()


def main():

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

    print(count)

if __name__ == "__main__":
    main()

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

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

Solution (Python):
n=int(input())
h=list(map(int,input().split()))
ans=0
maxh=h[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()))
m = 0
ans = 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()))

top = H[0]
cnt = 1

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

print(cnt)

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

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

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

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

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

print(cnt)

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

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

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

cnt = 1
max = heights[0]
for p in range(n):
    if p == 0:
        continue
    else:
        if max <= heights[p]:
            max = heights[p]
            cnt += 1

print(cnt)

Solution (Python):






def main():
  N = int(input())
  h = list(map(int,input().split()))
  highest = 0
  res = 0
  for i in range(N):
    if h[i] >= highest:
      res += 1
      highest = h[i]
  print(res)
  return

if __name__ == '__main__':
  main()

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

Solution (Python):
n = int(input())
h = list(map(int, input().split()))
            
def bubble(inputlist):
    for i in range(len(inputlist)-1):
        if inputlist[i] > inputlist[-1]:
            return False
    return True
cnt = 0
for i in range(n):
    is_candidate = True
    for j in range(i):
        if h[j] > h[i]:
            is_candidate = False
            break
    if is_candidate:
        cnt+=1
print(cnt)

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, *H = map(int, read().split())

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

    print(ans)
    return


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
N = int(input())
h0 = 0
cnt = 0
for h in map(int, input().split()):
    if h >= h0:
       cnt += 1
       h0 = h
print(cnt)

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

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:
        ans += 1
        highest = h[i]
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
print(cnt)

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

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

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

Solution (Python):


import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)


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

max_h = 0

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

print(count)

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

c=1
maxh=H[0]
for i in range(1,len(H)):
    if maxh<=H[i]:
        c+=1
        maxh=H[i]
print(c)

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):
    x = h[i]
    for j in range(i):
        if x < h[j]:
            break
    else:
        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+1]) == h[i]:
        cnt += 1
print(cnt)

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

c = 1
h_max = h[0]

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

print(c)

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

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

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

cnt=0
highest=H[0]

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

print(cnt)

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

c = 0

for i in range(n):
  t = True
  for j in range(i):
    if h[j] > h[i]:
      t = False
      break
  if t == True:
    c += 1
  t = True
print(c)

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

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

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

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

ans = 1

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

print(ans)

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

max_num = 0
res = 0
for num in a:
    if max_num <= num:
        max_num = num
        res += 1

print(res)

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

left = 0
ret = 0
for i in h:
    if i >= left:
        ret += 1
        left = i
print(ret)

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

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

Solution (Python):
n = int(input())
count = 0
h = [int(s) for s in input().split()]
l = 0
for i in range(n):
    if h[l] <= h[i]:
        count += 1
        l = i
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):
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

def main():
    N=ii()
    H=list(mi())

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


                





if __name__ == "__main__":
    main()

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

print(ans)

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

hmax_rui = [0]*n
hmax_rui[0] = h[0]
for i in range(1,n):
    hmax_rui[i] = max(hmax_rui[i-1],h[i])

cnt = 0
for i in range(n):
    if h[i]==hmax_rui[i]:
        cnt +=1
print(cnt)

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

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()))
a = 1
m = h[0]

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

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

Solution (Python):
N = int(input())
H = list(map(lambda h: int(h), input().split(" ")))
M = 0
cnt = 0

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

print(cnt)

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

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()
    H = LI()

    ans = 0
    m = 0
    for i in H:
        if i >= m:
            ans += 1
        m = max(i, m)

    print(ans)

if __name__ == '__main__':
    resolve()

Solution (Python):
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n = ni()
    H = nl()
    ans = 0
    for i in range(n):
        for j in range(i):
            if H[j] > H[i]:
                break
        else:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

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

for i in range(n):
    l.append(h[i])
    if h[i] == max(l):
        cnt += 1
        
print(cnt)

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

Solution (Python):
'''     ░░█ ▄▀█ █   █▀ █░█ █▀█ █▀▀ █▀▀   █▀█ ▄▀█ █▀▄▀█  
        █▄█ █▀█ █   ▄█ █▀█ █▀▄ ██▄ ██▄   █▀▄ █▀█ █░▀░█     '''







import math;   from collections import *
import sys;    from functools import reduce
import time;   from itertools import groupby



def input()         : return sys.stdin.readline()
def get_ints()      : return map(int, input().strip().split())
def get_list()      : return list(get_ints())
def get_string()    : return list(input().strip().split())
def printxsp(*args) : return print(*args, end="")
def printsp(*args)  : return print(*args, end=" ")


DIRECTIONS = [(+0, +1), (+0, -1), (+1, +0), (+1, -1)] 
NEIGHBOURS = [(-1, -1), (-1, +0), (-1, +1), (+0, -1),\
              (+1, +1), (+1, +0), (+1, -1), (+0, +1)]


CAPS_ALPHABETS = {chr(i+ord('A')) : i for i in range(26)}
SMOL_ALPHABETS = {chr(i+ord('a')) : i for i in range(26)}
INF = float('inf')




n = int(input())
li =get_list()
max_so_far = -1
ans = 0
for i in li:
	if i >= max_so_far:
		ans += 1
	max_so_far = max(max_so_far, 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 m<=h[i]:
        ans+=1
        m=h[i]
print(ans)

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

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

height = H[0]
ans = 1
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()))

ans = 0
vi = h[0]

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

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

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

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

cnt = 0
for i in range(2,N+1):
  if max(H[:i]) <= H[i-1]:
    cnt += 1
print(cnt+1)

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

print(cnt)

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

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

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

Solution (Python):
N = int(input())
MM = input().split()
count1 = 0
for i in range(N):
  count2 = 0
  for j in range(i+1):
    if int(MM[i]) < int(MM[j]):
      count2 +=1
  if count2 == 0:
    count1 +=1
print(count1)

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

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

highest = 0
cnt = 0

for i in H:
    if i >= highest:
        highest = i
        cnt += 1
print(cnt)

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

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

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

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

print(ans)

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

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

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

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

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

Solution (Python):
N = int(input())
H = list(map(int, 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 = [int(xi) for xi in input().split()]

h0 = 0
count = 0
for xi in range(n):
    if h0 <= h[xi]:
        count+=1
        h0=h[xi]

print(count)

Solution (Python):





















































def log(line):
    if False:
        print(line)


def calculation(lines):
    
    N = int(lines[0])
    values = list(map(int, lines[1].split()))
    
    
    
    
    
    
    
    

    result = 0

    for i in range(N):
        if values[i] >= max(values[:i+1]):
            result += 1

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['4', '6 5 6 8']
        lines_export = [3]
    if pattern == 2:
        lines_input = ['5', ' 4 5 3 5 4']
        lines_export = [3]
    if pattern == 3:
        lines_input = ['5', '9 5 6 8 4']
        lines_export = [1]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  

N = I()
H = LI()
ans = 0
r = 0
for i in range(N):
    if H[i] >= r:
        ans += 1
        r = H[i]
print(ans)

Solution (Python):
_,*l=map(int,open(0).read().split())
m=c=0
for i in l:
  if m<=i: m=i; c+=1
print(c)

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

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

print(count)

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