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):
def main():
    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)


if __name__ == '__main__':
    main()

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

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

print(count)

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

max = 0
count = 0

for i in range(N):
    if list_H[i] >= max:
        max = list_H[i]
        count += 1
    elif list_H[i] < max:
        pass

print(count)

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

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

necessary_height = a[0]
answer = 0
for i in range(n):
  if (a[i] >= necessary_height):
    answer += 1
    necessary_height = a[i]
    
print(answer)

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

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

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

min_hight = 0
cnt = 0

for h in hs:
    if h >= min_hight:
        cnt += 1
        min_hight = h

print(cnt)

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

high = 0
count = 0

for bilding in l:
    if bilding > high:
        high = bilding
        count += 1
    elif bilding == high:
        count += 1
    else:
        pass
print(count)

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

now_max_height = 0
viewable = 0
for i in range(N):
    if Hs[i] >= now_max_height:
        viewable += 1
        now_max_height = Hs[i]
print(viewable)

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[j] > H[i]:
      break
  else:
    ans += 1
print(ans)

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

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

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

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]








N = int(input())
A = [int(x) for x in input().split()]
ans = 0
for i in range(N):
    if max(A[:i+1]) <= A[i]:
        ans += 1
print(ans)

Solution (Python):
a = int(input())
b = map(int,input().split())
b = list(b)
k = 1
for i in range(a-1):
    maxim = max(b[:i+1])
    if maxim <= b[i+1]:
        k += 1
print(k)

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

counter = 1
max_num = H[0]

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

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

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

print(count)

Solution (Python):
N = int(input())
li = list(map(int, input().split()))
mireru = []
highest = 0
for i in li:
    if i >= highest:
        mireru.append(1)
        highest = i
print(sum(mireru))

Solution (Python):
n = int(raw_input())
m = map(int, raw_input().split())
max_m = [0 for i in range(n)]
max_m[0] = m[0]
ans = 1
for i in range(1, n):
  if m[i] >= max_m[i - 1]:
    ans = ans + 1
    max_m[i] = m[i]
  else:
    max_m[i] = max_m[i - 1]
print ans

Solution (Python):
N = int(input())
H = list(input().split())
test = 0
count = 0
for i in range(N):
    if int(H[i]) >= test:
        count += 1
        test = int(H[i])
    else:
        pass

print(count)

Solution (Python):


''' 
------------------------
author : iiou16
------------------------
'''

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

    print(count)


if __name__ == '__main__':
    main()

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

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

count, max_h = 0, 0
for h in hs:
    if h >= max_h:
        max_h = h
        count += 1

print(count)

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

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

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

Solution (Python):
num = list(map(int, input().split()))
heights = list(map(int, input().split()))
view = 0

for i, height in enumerate(heights):
    if i==0:
        view +=1
    else:
        if height >= max(heights[0:i]):
            view +=1
        
    
print (view)

Solution (Python):

"""
B - Great Ocean View
https://atcoder.jp/contests/abc124/tasks/abc124_b

"""
import sys


def solve(N, heights):
    max_height = -1
    res = []
    for h in heights:
        res.append(h >= max_height)
        max_height = max(max_height, h)
    return sum(res)


def main(args):
    N = int(input())
    heights = [int(h) for h in input().split()]
    ans = solve(N, heights)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

count = 1
bounds = H[0]

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

print(count)

Solution (Python):
from sys import stdin


def main():
    _ = int(stdin.readline().rstrip())
    Hs = [int(x) for x in stdin.readline().rstrip().split()]
    print(len([x for i, x in enumerate(Hs) if i == 0 or max(Hs[:i]) <= x]))


if __name__ == "__main__":
    main()

Solution (Python):

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

res = 0
m = 0
for a in H:
    if m <= a:
        res += 1
    m = max(m, a)
print(res)

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

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

print(ans)

Solution (Python):


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

count=[0]*N
count[0]=1

for ii in range(1,N):
    if H[ii] >= max(H[:ii]):
        count[ii]=1
    else:
        count[ii]=0
    
print(sum(count))

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

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

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

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

m = a[0]
count = 1
for i in range(1, n):
    if a[i] > m:
        m = a[i]
        count += 1
    elif a[i] == m:
        count += 1

print(count)

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



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

print(cnt)

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

for i in H:
	if higher <= i:
		higher = 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[:i]) <= h[i]:
        ans += 1

print(ans)

Solution (Python):
N = int(input())
A = list(map(int,input().split(" ")))
m = float('-inf')
count = 1
for i in range(1,N):
    m = max(m,A[i-1])
    if A[i]>=m: count += 1
print(count)

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

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

sum = 0



def get_max_h(i):
    max_h = 0
    if i > 0:
        max_h = max(h[:i])
    return max_h

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

print(sum)

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

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

Solution (Python):
def solve():
    N = int(raw_input())
    H = [int(_) for _ in raw_input().split()]
    MaxH = H[0]
    cnt = 1
    for i in range(1,N):
        if H[i] >= MaxH:
            cnt += 1
            MaxH = H[i]
    print str(cnt)

if __name__ == '__main__':
    solve()

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

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

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


print(hotel)

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

v = [True] * l

for i in range(l):
    for j in range(i + 1, l):
        if v[j]:
            v[j] = (heights[i] <= heights[j])

print(sum(v))

Solution (Python):

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

M = [0] * (N+1)

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

print(SUM)

Solution (Python):
'''input
5
9 5 6 8 4
'''
N=int(input())
H=list(map(int,input().split()))
count=1

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

Solution (Python):
_ = input()
max_h = 0
count = 0
high = map(int, input().split())
for height in high:
    if max_h <= height:
        max_h = height
        count += 1
print(count)

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

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
m = 0
c = 0
for i in A:
    if m <= i:
        c += 1
        m = i

print(c)

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

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

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

Solution (Python):


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

if __name__ == '__main__':
    N = int(input())
    H = [int(h) for h in input().split()]
    
    main(N, H)

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

count = 0

High = H[0]

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

print(count)

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

count = 0
high = h[0]

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

print(count)

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

for i in range(1, N):
    if H_list[i] >= max(H_list[:i]):
        res += 1

print(res)

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

Solution (Python):
n, h = int(input()), [int(x) for x in (input().split())]
c,m = 0, 0;

for x in (range(n)):
   if (m <= h[x]):
      m,c = h[x],c+1

print(c)

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

print(x)

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

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

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

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

print(cnt)

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

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

cnt = 0
previous = 0
for i in range(len(lst)):
  if previous <= lst[i]:
    cnt += 1
    previous = lst[i]
print(cnt)

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

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

a = 1

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

print(a)

Solution (Python):





import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int, input().split()))




base = A[0]
counter = 1
for i in range(1, N):
    if A[i] >= base:
        counter += 1
        base = A[i]
print(counter)

Solution (Python):


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


ans = 0

for i in range(N):

    
    flag = True

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


print(ans)

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

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

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

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

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

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

Solution (Python):
inf = float("inf")

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
def input_int():return int(input())
def input_ints():return map(int,input().split())
def input_ints_list():return list(input_ints())
def input_str():return input()
def input_strs():return input().split()
def input_lines(n,f):return [f() for _ in range(n)]

import importlib
def import_module(name):return importlib.import_module(name)

def gcd_base(a,b):return import_module('fractions').gcd(a,b) 
def gcd(a):return import_module('functools').reduce(gcd_base,a) 
def lcm_base(a,b):return (a*b)//gcd_base(a,b) 
def lcm(a):return import_module('functools').reduce(lcm_base,a,1) 

def permutations(a,n):return import_module('itertools').permutations(a,n) 
def combinations(a,n):return import_module('itertools').combinations(a,n) 
def product(a,b):return import_module('itertools').product(a,b) 

def init_array_1dim(v,n):return [v]*n
def init_array_2dim(v,n,m):return [init_array_1dim for _ in range(m)]


def ceil(a):return import_module('math').ceil(a) 
def floor(a):return import_module('math').floor(a) 


def init_q(a):return import_module('collections').deque(a)
def q_pop(a):return a.popleft()
def q_push(a,v):a.appendleft(v)
def q_pushlist(a,l):a.extendleft(l)
def q_append(a,v):a.append(v)
def q_appendlist(a,l):a.extend(l)


def init_heap(a):import_module('heapq').heapify(a)
def heap_push(a,v):import_module('heapq').heappush(a,v)
def heap_pop(a):return import_module('heapq').heappop(a) 


def bisect_left(a,x):return import_module('bisect').bisect_left(a,x)
def bisect_right(a,x):return import_module('bisect').bisect_left(a,x)
def insert_left(a,x):return import_module('bisect').insert_left(a,bisect_left(a,x))
def insert_right(a,x):return import_module('bisect').insert_right(a,bisect_right(a,x))


def cumsum(a):return import_module('numpy').cumsum(import_module('numpy').array(a)) 
def cumprod(a):return import_module('numpy').cumprod(import_module('numpy').array(a)) 
def cumgcd(a):return import_module('numpy').frompyfunc(gcd_base, 2, 1).accumulate(a, dtype=import_module('numpy').object).astype(import_module('numpy').int) 

class UnionFind(object):
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]
        self.size = [1 for _ in range(n)]

    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x
            self.size[x] += self.size[y]

    def is_same(self, x, y):
        return self.find(x) == self.find(y)

    def get_size(self, x):
        x = self.find(x)
        return self.size[x]

def dfs(pos):
    ret = 0
    l = []
    for e in l:
        next = e
        ret += dfs(next)
    return ret

def bfs(l):
    q = init_q(l)
    pos = 0
    q_push(q,pos)
    while q:
        now = q_pop(q)
        for e in l:
            next = e
            q_append(q,next)


def warshall_floyd(n,graph):
    d = init_array_2dim(float("inf"),n,n)
    
    for i in range(n):
        d[i][i] = 0
        for j in range(n):
            if graph[i][j]:d[i][j] = 1
    
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j],d[i][k] + d[k][j])
    return d


def init_graph(n,a,directed=False):
    visited = init_array_1dim(False,n)
    graph = init_array_2dim(False,n,n)
    for e in a:
        graph[e[0]-1][e[1]-1] = True
        if not directed:graph[e[1]-1][e[0]-1] = True 
    return visited,graph

def two_pointers(s,threshold,ope='sum'):
    l,r = 0,0
    base = 0 
    if ope == 'sum':base = 0
    if ope == 'prd':base = 1
    diff = 0
    while r < len(s):
        val = 0
        if ope == 'sum':val = base+s[r]
        if ope == 'prd':val = base*s[r]
        if val <= threshold:
            if ope == 'sum':base += s[r]
            if ope == 'prd':base *= s[r]
            diff = max(diff, r-l+1)
            r += 1
        elif l == r:
            r += 1
            l += 1
        else:
            if ope == 'sum':base -= s[l]
            if ope == 'prd':base //= s[l]
            l += 1
    return diff


def solution():
    global N,H
    N = input_int()
    H = input_ints_list()

    t = 0
    ret = 0
    for h in H:
        if t <= h:
            ret += 1
            t = h
    print(ret)

if __name__ == '__main__':
    solution()

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

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

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

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

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

Solution (Python):



def main():
    n = int(input())
    h = map(int, input().split())
    current_max = 0
    ans = 0
    for hi in h:
        if hi >= current_max:
            ans += 1
        if hi > current_max:
            current_max = hi
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
lia=[int(it) for it in input().split()]
lib=[0]*N

ma = -1
s=0
for i in range(N):
  if (lia[i]>=ma):
    s+=1
  ma = max(lia[i],ma)
print (s)

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

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

ans = 0

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

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

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

print(count)

Solution (Python):
def countInn(n, L):
  numInn = 1
  mainHurdle = L[0]
  hurdle = mainHurdle
  for i in range(1, n):
    currentH = L[i]
    if currentH < mainHurdle or currentH < hurdle:
      continue
    numInn += 1
    hurdle = currentH
  print(numInn)
  
n = int(input())
a = list(map(int, input().split()))
countInn(n, a)

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

Solution (Python):
N = int(input())
H = [int(j) for j in input().split()]
count = 1
for j in range(1,N):
	if H[j] >= max([H[k] for k in range(0,j)]):
		count = count + 1
print(count)

Solution (Python):
n = int(input())
str_hlist = input().split(' ')

count = 0
height = 0

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

print(count)

Solution (Python):
N = int(input())
h_list = map(int,input().split())
cnt = 0
max_h = 0

for h in h_list:
    max_h = max(max_h, h)
    if max_h == h:
        cnt += 1
  
print(cnt)

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

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


counter = 1
comp = []
comp.append(mounts[0])

for mount in mounts[1:]:
    Flag = False
    
    for c in comp:
        if c > mount:
            Flag = True
            break
    if not Flag:
        counter += 1
    comp.append(mount)
    

print(counter)

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

max_height = 0
counter = 0
for i in range(n):
  if hhh[i] >= max_height:
    max_height = hhh[i]
    counter += 1

print(counter)

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

max_hs = [0]
for h in hs:
  max_hs.append(max(max_hs[-1], h))

count = 0
for h, max_h in zip(hs, max_hs[1:]):
  if h >= max_h:
    count += 1
  
print(count)

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

print(ans)

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

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

tmp = arr[0]
ans = 0

for i in range(n):
	if tmp <= arr[i]:
		ans += 1
		tmp = arr[i]

print(ans)

Solution (Python):

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

h_max = hs[0]
viewable = [hs[0]]
for i in range(1, n):
    h_height = hs[i]
    if h_height < h_max:
        continue
    h_max = h_height
    viewable.append(h_height)

print(len(viewable))

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

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

cnt=0

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

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

max = num[0]
count = 1

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

print(count)

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

Solution (Python):
from itertools import *

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

print(1 + sum([
    int(all([ hj <= h for hj in islice(Hn, i+1) ]))
    for i, h in enumerate(Hn[1:])
]))

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

hantei = 1

for i in range(1,N):
    for j in range(0,i):
        if H[j] > H[i]:
            break
        if j == i-1:
            hantei = hantei + 1
print(hantei)

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

highest = 0
count= 0

for top_i in H:
    if(top_i >= highest):
        count += 1
        highest = top_i

print(count)

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

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

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

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

ocean = 1
for i in range(1, n):
    count = 0
    for j in range(0, i):
        if H[j] > H[i]:
            count += 1
        if count >= 1:
            break
    if count == 0:
        ocean += 1

if n == 1:
    print(1)
else:
    print(ocean)

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

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

print(ans)

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

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

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

print(ans)

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

ans = 0
for i in range(n):
  if i == 0:
    ans += 1
  else:
    if max(lih[0:i]) <= lih[i]:
      ans += 1
print(ans)

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

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

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

Solution (Python):
size=int(input())
mountain=input().split()
count=0
highest=0
for i in range(0,size):
    if(int(mountain[i])>=highest):
        count+=1
        highest=int(mountain[i])
    else:
        continue
print(count)

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