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

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

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=input()
H=[int(h) for h in input().split()]
maximum=0
count=0
for h in H:
    if h>=maximum:
        maximum=h
        count+=1
print(count)

Solution (Python):
N = list(map(int, input().split()))
A = list(map(int, input().split()))
max = -1
count = 0
for height in A:
    if max <= height:
        count += 1
        max = height
print(count)

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

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())
li = list(map(int, input().split()))

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

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

print(sum)

Solution (Python):

def nyan(f=lambda x: x):
    return map(f,input().split())
def nyannyan(f=lambda x: x,i=0):
    if i==0: return list(map(f,input().split()))
    l = []
    for j in range(i):
        l.append(f(input()))
    return l

n, = nyan(int)
h = nyannyan(int)
t, j = (0, 0)
for i in range(n):
    if(h[i]>=t):
        j+=1
        t=h[i]
print(j)

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

res = 0
ma = h[0]
for e in h:
  if ma <= e:
    ma = e
    res += 1
print(res)

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

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

print(cnt)

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

for i in range(N):
        hoge = 0
        for k in range(i):
                if A[k] <= A[i]:
                        hoge += 1
                else:
                        break
        if hoge == i:
                output += 1

print(output)

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

Solution (Python):
N = input()
hlt = input().split()

for i in range(0, len(hlt)):
    hlt[i] = int(hlt[i])

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

print(cnt)

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

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

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

highest = L[0]
ans = 0

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

print(ans)

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

c1 = 0
for i1 in range(n1):
    if i1 == 0:
        c1 += 1
        continue
    if max(n2[0:i1]) <= n2[i1] :
        c1 += 1

print(c1)

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

Solution (Python):
input()
l=r=0
for i in map(int,input().split()):
  if i>=l:
    r+=1
    l=i
print(r)

Solution (Python):
N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N-1):
  c += 1
  if b <= a[c] :
    b = a[c]
    ans += 1
print(ans + 1)

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

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

    if flag:
        ans += 1

print(ans)

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

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

Solution (Python):

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


max = H[0]
ans = N
for i in xrange(1,N):
  if H[i-1]>H[i]:
    if max<H[i-1]:
      max = H[i-1]
    ans -= 1
    continue
  if max > H[i]:
    ans -= 1

print ans

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

cnt = 0
m = 0

for h in H:
    if h >= m:
        m = h
        cnt += 1

print(cnt)

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

Solution (Python):
n=int(input())
h=list(map(int,input().split()))
i=0
j=0
ans=0
while True:
  try:
     if h[i]>=j:
        ans=ans+1
        j=h[i]
     i=i+1
  except:
       print(ans)
       break

Solution (Python):

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

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

Hmax=L[0]
ans=0

for i in range(N):
    if L[i]>=Hmax:
        Hmax=L[i]
        ans+=1

print(ans)

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

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

print(cnt + 1)

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

Solution (Python):
n = int(input())
h = [int(x) for x 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()))
cnt = 1
for i in range(1,n):
    if h[i] >= max(h[0:i+1]):cnt += 1
print(cnt)

Solution (Python):
def resolve():
	N=int(input())
	H=list(map(int,input().split()))
	mx=0
	cnt=0
	for i in H:
		if i>=mx:
			mx=i
			cnt+=1
	print(cnt)

resolve()

Solution (Python):










import numpy as np
import math
import copy

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

num = 0

for i in range(len(h)):
    for j in range(len(h)):
        if i == j:
            num += 1
        if h[j] > h[i]:
            break

print(num)

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

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



import sys

input = sys.stdin.readline

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

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

main()

Solution (Python):
n=input()
a=map(int,raw_input().split())
count=1
b=0
for i in range(1,n):
    j=1
    while b >= 0 and i!=j-1:
        if a[i]>=a[i-j]:
            j+=1
        else:
            break
        if i==j-1 :
            count+=1
print(count)

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 = max(maxH, H[i])

print (ans)

Solution (Python):
number = int(input())
height = list(map(int,input().split()))
count = 1
height_max = height[0]

for i in range(1,number):
    if height[i] >= height_max:
        count += 1
        height_max = height[i]
print(count)

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

i = 0
ans = 1
Front = []

while i <= N-2:
    Front.append(H[i])
    if H[i+1] - max(Front) >= 0:
            ans = ans + 1
    i = i+1

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)


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

count = 0
max_h = 0

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

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

ans = 0

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

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)


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

count = 0
max_h = 0

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

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

h.reverse()
ans = 0
flag = 0
for i in range(n):
    flag = 1
    for j in range(i, n):
        if h[i] < h[j]:
            flag = 0
            break

    if flag == 1:
        ans += 1

print(ans)

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

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

print(count)

Solution (Python):
def method3():
    n = (int(input()))
    nums = list(map(int, input().split()))
    result = 1
    hantei = True
    for i in range(1,n):
        hantei = True
        for j in range(i):
            if nums[i]<nums[j]:
                hantei = False
                break
        if hantei:
            result = result + 1
    print(result)
    
if __name__ == "__main__":
    method3()

Solution (Python):
import sys


def CheckRangeInt(input_str,_min,_max):

    if input_str.isdecimal()==0 or int(input_str)<_min or int(input_str)>_max:
        print("error")
        sys.exit()

    return int(input_str)


def CheckRangeList(input_list,_min,_max):
    for i in range(len(input_list)) :
        if H[i]<_min or H[i]>_max :
            print("error")
            sys.exit()
    return input_list

N=input()






N=CheckRangeInt(N,1,20)


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

if len(H)!=N :
    print("error")
    sys.exit()






H=CheckRangeList(H,1,100)

highest=0
can_see=0

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

print(can_see)

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

maxHeight = 0
ans = 0

for height in H :
    if height >= maxHeight :
        ans += 1
    maxHeight = max(maxHeight,height)

print(ans)

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

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

res = 0
for i in range(len(H)):
    cnt = 0
    for j in range(0, i):
        if H[j] > H[i]:
            cnt += 1
    if cnt == 0:
        res += 1

print(res)

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

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

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

Solution (Python):
n = input()
h = input().split()

sum_hotel = 0
max_height_mt = 0

for i in range(int(n)):
    if max_height_mt <= int(h[i]):
        sum_hotel += 1
    if max_height_mt <= int(h[i]):
        max_height_mt = int(h[i])

print(sum_hotel)

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

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

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

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

print(ans)

Solution (Python):


def problem():
    N = int(input())
    H = list(map(int, input().split()))
    print(algorithm(N,H))


def algorithm(N: int, H):
  currentMax = H[0]
  counter = 1
  for i in range(1, N):
    if currentMax <= H[i]:
      counter += 1
      currentMax = H[i]
    
  return counter

problem()

Solution (Python):

import copy
import numpy as np
import random
import bisect 
import math


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


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

"""
ans = 0
for i in range(N):
    base = H[i]
    check = True
    for j in range(N):
        if i<=j:
            pass
        else:
            if H[i]>=H[j]:
                pass
            else:
                check = False
                break
    if check:
        ans += 1
print(ans)
"""

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

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

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

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

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

Solution (Python):
n=int(input())
ms=list(map(int,input().split(" ")))
ans=1
for i in range(n-1):
    check=list(filter(lambda x:x>ms[i+1],ms[:(i+1)]))
    if len(check)==0:
        ans+=1
print(ans)

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

h_list = []
count = 0
for h in H:
    h_list.append(h)
    h_max = max(h_list)
    if h >= h_max:
        count += 1
print(count)

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

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

print(count)

Solution (Python):
n = int(input())
height_list = [int(i) for i in input().split(" ")]
is_see_count = 0
for i in range(n):
    if n == 0:
        is_see_count += 1
    else:
        height = height_list[i]
        for j in range(i):
            if not height >= height_list[j]:
                break
        else:
            is_see_count += 1
print(is_see_count)

Solution (Python):
from sys import stdin


def main():
    N = int(input())
    h_lst = [int(x) for x in stdin.readline().split()]
    lst = []
    count = 0
    for i in range(N):
        lst.append(h_lst[i])
        if h_lst[i] >= max(lst):
            count += 1
    print(count)


if __name__ == "__main__":
    main()

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

maxh = 0
view = 0

for hh in h:
    if hh >= maxh:
        view += 1
        maxh = hh

print(view)

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

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

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

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

print(cnt)

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

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

print(num)

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

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

height = 0
ans = 0

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

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

ans = 1
m = H[0]

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

print(ans)

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

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

Solution (Python):
import sys
import os


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

print(count)

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

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

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


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

print(cnt)

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

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b



def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)



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


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

    ans = 1
    for i in range(1, N):
        ok = True
        for j in range(i):
            if H[j] > H[i]:
                ok = False

        ans += ok
            
    print(ans)


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
from functools import reduce

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

h_max = 0
count = 0

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

print(count)

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

ans = 0
tall = H[0]

for n in range(N):
    if tall <= H[n]:
        tall = H[n]
        ans += 1

print(ans)

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

print(c)

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

max_height=0
cnt=0
for height in h:
	if height>=max_height:
		cnt+=1
	max_height=max([max_height,height])

print(cnt)

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

max_ = 0
cnt = 0

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

print(cnt)

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

ans = 1
max_H = H[0]
for i in range(1, len(H)):
    if H[i-1] <= H[i] and max_H <= H[i]:
        max_H = H[i]
        ans += 1

print(ans)

Solution (Python):
mountain = input()
viewpoint = input().split()
maxheight = 0
canview = 0

for i in range(0, int(mountain)):
    if maxheight <= int(viewpoint[i]):
        maxheight = int(viewpoint[i])
        canview += 1

print(canview)

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

ans = 0
for i in range(N):
  if A[i] == B[i]:
    ans += 1
    
print(ans)

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

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

print(cnt)

Solution (Python):
from collections import deque
N = int(input())
H = list(map(int, input().split()))
V = deque()
for i in range(len(H)):
    counter = 0
    for j in range(i):
        if H[i] >= H[j]:
            counter += 1
    if counter == i :
        V.append(H[i])
print(len(V))

Solution (Python):
from collections import deque
N = int(input())
H = list(map(int, input().split()))
V = deque()
for i in range(len(H)):
    counter = 0
    for j in range(i):
        if H[i] >= H[j]:
            counter += 1
    if counter == i :
        V.append(H[i])
print(len(V))

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

a = 0
ans = 0

for i in H:
  if a <= i:
    a = i
    ans += 1
print(ans)

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

MAX = 0
count = 0

for X in H:
    if MAX <= X:
        MAX = X
        count += 1
print(count)

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

count = 0
highest = 0

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

print(count)

Solution (Python):

n = input()
n = int(n)
lst1 = input().split()

h_mtn = 0
count = 0

for i in range(0, n, 1):
    state = lst1[i]
    state = int(state)
    if state >= h_mtn:
        count += 1
    if state > h_mtn:
        h_mtn = state

print(count)

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

Solution (Python):
import sys
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def II(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def SI(): return input()
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')

N = II()
H_li = LI()

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

print(counter)

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

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

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

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

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

Solution (Python):
N = input()
N = int(N)
str = input().split()
H = []
i = 0
j = 0
for i in range(N):
  H.append( int(str[i]) )
flag = 0
ans = 0
for i in range(N):
  for j in range(i):
    if H [i] < H[j]:
      flag =  1
      break
    else:
      flag = 0
  if flag == 0:
    ans = ans+1
  flag = 0

print(ans)

Solution (Python):
n = int(input())
lista = [int(x) for x in input().split()]
maxi = 0
res = 0
for i in range (0, len(lista)):
  if lista[i]>=maxi:
    res+=1
    maxi = lista[i]
print(res)

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

for i in range(n):
    if highest <= h_list[i]:
        count += 1
        highest = h_list[i]

print(count)

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

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

print(count)

Solution (Python):
def sub():
    N, Hs = [input() for _ in range(2)]
    Hs = [int(e) for e in Hs.split(" ")]
    count = 1
    maxH = Hs[0]
    for i in range(1, int(N)):
        h = Hs[i]
        if h >= maxH:
            count = count + 1
            maxH = h


    print("{}".format(count))

sub()

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

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

maxHeight = 0
count = 0

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

print(count)

Solution (Python):
from sys import stdin

def solve(n, hs):
    ans = 0
    max_height = hs[0]
    for i, height in enumerate(hs):
        if i == 0 or max_height <= height:
            ans = ans + 1
            max_height = height
    return ans


def main():
    lines = stdin.readlines()
    n = int(lines[0])
    hs = [int(n) for n in lines[1].split(' ')]
    ans = solve(n, hs)
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
a = list(map(int, input().split()))
b = list(map(int, input().split()))
d = []
for i in range(len(b)):
    c = False
    for j in range(i):
        if b[i] < b[j]:
            c = True
    if c == False:
        d.append(i+1)

print(len(d))

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

Solution (Python):
n = int(input())
mountain = [ int(s) for s in input().split(" ")]
ans = 0
highest = 0

for m in mountain:
    if m >= highest:
        ans += 1
        highest = m

print(ans)

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

Solution (Python):
def solve(h_list):
  ans = 0
  h_max = h_list[0]
  for h in h_list:
    if h >= h_max:
      ans += 1
      h_max = h

  return ans

def main():
  n = int(input())
  h_list = list(map(int, input().split()))
  
  ans = solve(h_list)
  print(ans)

main()

Solution (Python):



N=int(input())
heights = list(map(int,input().split()))  
ans = 0  
max_height = heights[0]  

for i in range(N):
    max_height = max(max_height,heights[i])
    if max_height == heights[i]:  
        ans += 1

print(ans)

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]:
        count += 1
        h = H[i]

print(count)

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

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

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

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

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

Solution (Python):


N=int(input())
H=list(map(int, input().split()))
count=1
Num= H[0]

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

print(count)

Solution (Python):
n = input()

h = input()
h = h.split(' ')
h = [int(a) for a in h]

r = 0
max = h[0]
for tmp in h:
    if max <= tmp:
        r += 1
        max = tmp

print(r)

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

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

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

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

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

print(c)

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

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