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())
l=list(map(int,input().split()))
nums=[x for x in range(n)]
cnt=0
for num in nums:
  s=l[:num+1]
  if(l[num]>=max(s)):
    cnt+=1
print(cnt)

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

total=1

for i in range(1,n):
  flag=True
  
  for j in range(i):
    
    dif=hl[i]-hl[j]
    
    if dif<0:
      flag=False
      break
  if flag:
    total+=1
print(total)

Solution (Python):
def p_b():
    n = int(input())
    *H, = map(int, input().split())
    c = 0
    ans = 0
    for h in H:
        if c <= h:
            c = h
            ans += 1
    print(ans)

    
p_b()

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

maxx = -1
cnt = 0
for i in range(len(l)):
    if l[i] >= maxx:
        maxx = l[i]
        cnt+=1
print(cnt)

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

Solution (Python):
import math
import heapq
import sys
from collections import Counter
import numpy as np
import datetime





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

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

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

Solution (Python):
re = 1
N = int(input())
H = list(map(int, input().split()))
tmp = H[0]

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

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

cnt = 1
hmax = h[0]

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

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 sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


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 solve():
    return


def main():
    N = int(input())
    H = list(map(int, input().split()))
    ans = 0
    for i in range(N):
        ok = True
        for j in range(i):
            if H[j] > H[i]:
                ok = False
                break
        ans += ok

    print(ans)


if __name__ == '__main__':
    main()

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

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
def print_ans(N, hs):
    """Test Case
    >>> print_ans(4, [6, 5, 6, 8])
    3
    >>> print_ans(5, [4, 5, 3, 5, 4])
    3
    >>> print_ans(5, [9, 5, 6, 8, 4])
    1
    """
    ans = 0
    tmp_max = 0
    for h in hs:
        if h >= tmp_max:
            ans +=1
        tmp_max = max(tmp_max, h)
    print(ans)

if __name__ == '__main__':
    N = int(input().rstrip())
    hs = list(map(int, input().rstrip().split()))
    print_ans(N, hs)

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

cnt =0
highest = 0

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

print(cnt)

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

count = 1
for idx, h in enumerate(H):
    if idx == 0:
        continue
    else:
        if max(H[:idx]) <= h:
            count += 1
print(count)

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

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

Solution (Python):
N = int(input())
Hn = list(map(int,input().split(' ')))
current_max = 0
amount_count = 0
for val in Hn:
    if current_max <= val:
        current_max = val
        amount_count += 1
print(amount_count)

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

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

cnt = 0
hmax = 0

for i in range(n):
    if ls_h[i] >= hmax:
        hmax = ls_h[i]
        cnt += 1

print(cnt)

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

for i in range(1,N):
    flag=1
    for j in range(i):
        if H[j]>H[i]:
            flag=0
    if flag==1:
        summary=summary+1

print(summary)

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

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

ans=0

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

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

print(ans)

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

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

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

print(count)

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

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

print(ans)

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

count = 1
for i in range(1, n):
    flag = True
    for j in range(0, i):
        if hn[i] < hn[j]:
            flag = False
    if flag:
        count += 1
print(count)

Solution (Python):
N = int(input())
H = [int(i) for i in input().split()]
ans = 1
for i in range(1, 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()))


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

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

print(count)

Solution (Python):

n = int(input())
h = [int(s) for s in input().split()]

number_inns_can_see_ocean = 0
highest = h[0]

for height_of_inn in h:
    if height_of_inn >= highest:
        number_inns_can_see_ocean += 1
        highest = height_of_inn

print(number_inns_can_see_ocean)

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

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

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

can_see_ocean = 0

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

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

max_ = H[0]
count = 0

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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
INF = 10**18


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


def main():
    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 i == j+1:
                ans += 1
    print(ans)


if __name__ == '__main__':
    main()

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

re = 1
M = h[0]

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

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

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

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

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

print(ans)

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

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

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

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

print(ans)

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

ans = 1
num = h[0]

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

Solution (Python):

import sys










def main():
    n, *h = [int(x) for x in sys.stdin.read().split()]

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

    print(count)



if __name__ == "__main__":
    main()

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

    max = raw_list[0]
    count = 1

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

if __name__ == "__main__":
    main()

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

ans = 1
for i in range(N-1):
    if h_list[i] <= h_list[i+1]:
        ans += 1
    else:
        h_list[i+1] = h_list[i]

print(ans)

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

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

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

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

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

print(cnt)

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

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

    if max <= h[i+1]:
        count += 1

print(count)

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

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

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

Solution (Python):
N = int(input())
high = list(map(int,input().split()))
count = 0
a = []

for i in range(1,N):
  a=[]
  for j in range(i):
    if high[i]-high[j]>=0:
      a.append(high[j])
  else:
    if len(a) == i:
      count += 1

print(count+1)

Solution (Python):

import numpy as np
N = int(input())
H = np.array(list(map(int, input().split())))
sum = 1
for i in range(1, N):
  max_hight = np.max(H[:i])
  if(H[i] >= max_hight):
    sum += 1

print(sum)

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

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

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

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

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

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

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

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

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

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

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

s=0

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

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

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

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

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

for i in range(N):
  templist.append(H[i])
  if H[i] >= max(templist):
    ans += 1

print(ans)

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

Solution (Python):
def convert(arr):
    H = []
    for value in arr:
        H.append(int(value))
    return H


def tellTop(i, arr):
    for index in range(i):
        if arr[index] > arr[i]:
            return False
    return True


def count(arr):
    count = 0

    for i in range(0,len(arr)):
        if tellTop(i, arr):
            count = count + 1

    return count


N = input()
arrH = input().split(' ')
N = int(N)
H = convert(arrH)

print(count(H))

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

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

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

Solution (Python):
n = int(input())
li = list(map(int, input().split()))
ans = 0
tmp = li[0]
for num in li:
    if(num >= tmp):
        tmp = num
        ans += 1

print(ans)

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

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


if __name__ == '__main__':
    main()

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 = map(int, input().split()[0:])

mx = 0
ans = 0

for h in H:
	if mx <= h: ans += 1
	mx = max(mx, h)

print(ans)

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())
li = list(map(int,stdin.readline().rstrip().split()))
point = 1
ma = li[0]
for i in range(1,n):
    if li[i] >= ma:
        point += 1
        ma = li[i]
print(point)

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

maxs = hs[0]
count = 1
for h in hs[1:]:
  if h >= maxs:
    maxs = h
    count += 1

print(count)

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

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

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

tmp_max = h[0]
count = 1

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

print(count)

Solution (Python):
def main(n, h):
    base = 0
    count = 0

    for _h in h:
        if _h >= base:
            base = _h
            count += 1

    print(count)


if __name__ == "__main__":
    n = int(input())
    h = list(map(int, input().split(' ')))

    main(n, h)

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

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

ans=0
MAX_H=H[0]

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

Solution (Python):
N = int(input())
H = list(map(int, input().split()))
cnt = 0
pre = 0
for x in H:
   if pre <= x:
      cnt+=1
      pre = x
print(cnt)

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

Solution (Python):


def main():
    N = int(input())
    Hs = [int(s) for s in input().split()]
    result = 0
    for i, ryokan in enumerate(Hs):
        for i2, syougai in enumerate(Hs):
            if i2 == i:
                result += 1
                break
            if ryokan < syougai:
                break
    print(result)


if __name__ == "__main__":
    main()

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

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

ans = 1

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

print(ans)

Solution (Python):
N = int(input())
H_list = [int(x) for x in input().split()]
cnt = 1
for i, H in enumerate(H_list):
    if (i==0): continue
    visible = True
    for j in range(i):
        if (H_list[j] > H):
            visible = False
            break
    if (visible):
        cnt += 1
print(cnt)

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

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

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

print(cnt)

Solution (Python):
n = int(input())
h = input().split()
a = int(h[0])
b = 0

for i in range(n):
    if a <= int(h[i]):
        a = int(h[i])
        b += 1
        
print(b)

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

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

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

con = 0

for i in range(N):
	for j in range(i):
		if H[i] < H[j]:
			break
	else:
		con += 1


print(con)

Solution (Python):
N = int(input())
hill = list(map(int, input().split()))
view = 0
f = False
highest = hill[0]
for i in range(N):
    if hill[i] >= highest:
        f = True
        highest = hill[i]
    else:
        f = False
    if f:
        view += 1
print(view)

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

h_L.append(0)

count = 0
for i in range(1,n):
    tmp_L = h_L[0:i+1]
    if h_L[i] == sorted(tmp_L)[-1]:
        count +=1

print(count+1)

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

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

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

print(ans)

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

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

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

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

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


print (cnt)

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

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

ans=1

temp=listh[0]
if n>=2:
	for i in range(1,n):
		if temp<=listh[i]:
			ans=ans+1
			temp=listh[i]
	
print(ans)

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

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

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

print(c)

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

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

for i in h:
    if i >= max:

        ans+=1
        max=i
print(ans)

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

R = 1
h = H[0]

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

print(R)

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

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

for i in range(1,n):
    temp = s[i]
    for j in range(i):
        if(s[j] > temp):
            ans -= 1
            break
        
        
print(ans)

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

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

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

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


highest_height = [H[0]]
for i in range(1,N):
    highest_height.append(max(highest_height[-1],H[i]))

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

print(ans)

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

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

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

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

print(ans)

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

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

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

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

h_0 = h_list[0]
count = 0
west = [0]

for i in h_list:
    if i >= h_0 and i >= max(west):
        count += 1
    h_0 = i
    west.append(i)

print(count)

Solution (Python):

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

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

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

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

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

Solution (Python):
from itertools import accumulate

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

max_h = list(accumulate(h, max))


print(sum([1 for h, m in zip(h, max_h) if h == m]))

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

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

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

Solution (Python):
import sys
from bisect import *
from collections import *
from copy import deepcopy
from datetime import *
from heapq import *
from itertools import *

from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    N = int(input())
    HS = list(map(int, input().split()))
    ans = 1
    last = HS[0]
    for h in HS[1:]:
        if h >= last:
            last = h
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    h = list(map(int, input().rstrip('\n').split()))
    mh = 0
    cnt = 0
    for v in h:
        if v >= mh:
            cnt += 1
        mh = max(mh, v)
    print(cnt)


if __name__ == '__main__':
    slove()

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

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

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

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

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

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

def main():
    N = int(input())
    H = [int(x) for x in input().split()]

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

    print(ans)
    

if __name__ == '__main__':
    main()