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())
a = list(map(int,input().split()))
x = [0]
ans = 0
for i in range(N):
  y = a[i]
  if max(x) <= y:
    ans += 1
  x.append(y)
print(ans)

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

Solution (Python):
n=int(input())
h=[int(x) for x in input().split()]
ans=0
maxhi_1=0
for hi in h:
    if maxhi_1<=hi:
        ans+=1
        maxhi_1=hi
print(ans)

Solution (Python):
n = int(input())
max_height = 0
res = 0
for elem in input().split():
    h = int(elem)
    if max_height <= h:
        res += 1
        max_height = h
print(res)

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

ma = H[0]
count = 0
for hi in H:
    if hi >= ma:
        count += 1
        ma = hi
print(count)

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

Solution (Python):




def main():
  input()
  heights = map(int, input().split())
  thres = 0
  count = 0

  for h in heights:
    if h >= thres:
      count += 1
      thres = h

  print(count)


if __name__ == '__main__':
  main()

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

Solution (Python):



import math


n = int(input())
hn = list(map(int, input().split()))
mx = 0
ans = 0
for h in hn:
  if mx <= h:
    ans += 1
    mx = h

print(ans)

Solution (Python):

N = int(input())
yama = input().split()

ans = 1
kj = int(yama[0])

for lop in range(1,N):
    if int(yama[lop]) >= kj :
        ans += 1
        kj = int(yama[lop])
    
 
print(ans)

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

n = 0
x = 0
for h in H:
    if x <= h:
        x = x + 1
        n = n + 1
        x = h
print(n)

Solution (Python):
def main():
    N = int(input())
    A = [int(n) for n in input().split()]
    m = -1
    res = 0
    for a in A:
        if a >= m:
            m = a
            res += 1
    print(res)
if __name__ == "__main__":
    main()

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

print(score)

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

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

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

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

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

Solution (Python):
"""
map(int,input().split())

"""
N = int(input())
h = map(int,input().split())

hls =  []

for i in h:
    hls.append(i)

mx = hls[0]
cnt = 1
for i in range(1,N):
    if mx <= hls[i]:
        cnt += 1
        mx = hls[i]

print(cnt)

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

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

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

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

ans = 1

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

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

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

mx = 0
count = 0
for i in a:
    if i >= mx:
        count += 1
        mx = max(i, mx)
print(count)

Solution (Python):



N = int(input())
X = list(map(int, input().rstrip().split(' ')))

v = 1
for i in range(1, N):
    if X[i] >= max(X[:i]):
        v += 1
        
print(v)

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

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

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

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

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

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

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

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

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

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

print(count)

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

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a, b = LI()
    if a < b:
        a, b = b, a
    ans = a
    a -= 1
    ans += max(a, b)
    print(ans)
    return


def B():
    n = II()
    h = LI()
    dp = [0 for i in range(n)]
    ans = 0
    for i in range(n):
        dp[i] = max(dp[i - 1], h[i])
        if dp[i - 1] <= h[i]:
            ans += 1
    print(ans)
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    B()

Solution (Python):
def main():
    input = sys.stdin.readline
    try:
        n = int(input())
        H = list(map(int, input().split()))
        
        cnt = 0
        now = 0
        for h in H:
            if h >= now:
                cnt += 1
            now = max(now,h)
            
        print(cnt)
        
    finally:
        input = None

import sys; sys.setrecursionlimit(50000)
if __name__ == "__main__":
    main()

Solution (Python):


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

ans = 0

for i in range(n):
    ok = True
    for j in range(0, i):
        if h[j] > h[i]:
            ok = False
            break
    if ok:
        ans += 1

print(ans)

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

print(ans)

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

print(ans)

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

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

ans = 0

h_max = h[0]

for i in h:
    if(h_max <= i):
        ans += 1
        h_max = i

print(ans)

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
highest=0
ans=0
for l in L:
    if l>= highest:
        ans+=1
        highest=l

print(ans)

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

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

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

print(ans)

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

m=l[0]
ans=0
for x in l:
    if m<=x:
        ans+=1
        m=x
print(ans)

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

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

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

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

ans = 0
for i in range(len(hs)):
    if i == 0:
        ans +=1
    else:
        if hs[i] >= max(hs[:i]):
            ans += 1
print(ans)

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

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

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

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

max_h = 0 
count = 0
for i, item in enumerate(h):
    if i == 0:
        max_h = item
        count += 1
    else:
        if item >= max_h:
            max_h = item
            count += 1
print(count)

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
H = LIST()

ans = []
for i in range(len(H)):
	if max(H[0:i+1]) == H[i]:
		ans.append(i)
print(len(ans))

Solution (Python):
_ = input()
nums = map(int, input().split())

c = 0
mx = 0

for i in nums:
    if i >= mx:
        c += 1
        mx = i

print(c)

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

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

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

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

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

cnt = 0
ma = 0
for h in H:
    if ma <= h:
        cnt += 1
        ma = h

print(cnt)

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

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

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

Solution (Python):



from itertools import chain
from functools import reduce
from collections import OrderedDict, Counter, deque
import operator

IS = lambda: int(input())
IA = lambda: [int(x) for x in input().split()]

_ = IS()
H = IA()

ans = 0
cur = -1
for h in H:
    if cur <= h:
        cur = h
        ans += 1
print(ans)

Solution (Python):
n = int(input())
*H, = map(int, input().split())
m = 0
ans = 0
for h in H:
    if h >= m:
        ans += 1
        m = h
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):

import itertools
import sys
import math
from functools import lru_cache





from queue import Queue
from operator import mul
from functools import reduce
from queue import Queue
from operator import mul
from functools import reduce
from functools import lru_cache

input = sys.stdin.readline





n = int(input())


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




ret = 0

for i in range(n):
    flag = True
    for j in range(i):
        if b[j] > b[i]:
            flag = False
    if flag == True:
        ret += 1
print(ret)

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

count = 0
for k, i in enumerate(lst):
    flg = True
    for j in lst[:k]:
        if j > i:
            flg = False
    if flg:
        count += 1
print(count)

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

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

print(ans)

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

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

maxh = 0
ans = 0
for h in hlist:
  if h >= maxh:
    ans += 1
    maxh = h
print(ans)

Solution (Python):
n = int(input())
lis = list(map(int,input().split()))
ans = 0
nu = 0
for num in lis:
  if num >= nu:
    nu = num
    ans += 1
print(ans)

Solution (Python):


import itertools
from collections import Counter
import bisect

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

    print(ans)


if __name__ == '__main__':
    main()

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

p=h[0]
ans=0

for i in h:
    if i>=p:
        ans+=1
        p=i

print(ans)

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))

    ans = 0
    H = A[0]
    for a in A:
        if a >= H:
            ans += 1

        H = max(H, a)

    return ans


if __name__ == '__main__':
    print(main())

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

ans = 0
maxi = -1

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

print(ans)

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

Solution (Python):
import math
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
H = IL()

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

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

Solution (Python):


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

cnt = 1
mx = H[0]

for h in H[1:]:
    if h >= mx:
        cnt+=1
        mx = h

print(cnt)

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

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

mx = -float("inf")

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

print(ans)

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

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

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

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

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

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

Solution (Python):
import atexit
import io
import sys

buff = io.BytesIO()
sys.stdout = buff


@atexit.register
def write():
    sys.__stdout__.write(buff.getvalue())

n = input()
l = map(int, raw_input().split())
ans = 0
for i in xrange(n):
	valid = 1
	for j in xrange(i):
		if l[j] > l[i]:
			valid = 0
			break
	if valid:
		ans += 1
print ans

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

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

def kakaka():
    a = list(map(int, input().split()))
    b = map(int, input().split())
    c = int(input())

def start_process():
    return
def main():
    a = int(input())
    b = list(map(int, input().split()))
    count = 0
    min_data = -1
    for i in range(a):
        if b[i] >= min_data:
            min_data = b[i]
            count += 1
    print(count)




if __name__ == '__main__':
    main()

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

count = 0
max_h = 0
for h in H:
	if max_h <= h:
		count += 1
		max_h = h

print(count)

Solution (Python):

def inpl(): return list(map(int, input().split()))
N = int(input())
H = inpl()
max_ = 0
ans = 0
for h in H:
    ans += h >= max_
    max_ = max(h, max_)
print(ans)

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


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read() for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N = read_a_int()
H = read_ints()

ans = 0
for i in range(N):
    tmp = H[i]
    ok = True

    for h in H[:i]:
        if tmp < h:
            ok = False

    if ok:
        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[:i]):
        cnt += 1

print(cnt)

Solution (Python):
def great_ocean_view(N: int, H: list)->int:
    max_h = 0
    count = 0
    for h in H:
        if max_h <= h:
            count += 1
            max_h = h
    return count


if __name__ == "__main__":
    N = int(input())
    H = [int(s) for s in input().split()]
    ans = great_ocean_view(N, H)
    print(ans)

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

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

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

        
print(count)

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

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N=INT()
A=LIST()

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

Solution (Python):
import sys
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())



N = ii()
H = lmi()
cnt = 0
for i in range(N):
    for j in range(i):
        if H[j] > H[i]:
            break
    else:
        cnt += 1

print(cnt)

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

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

n = 1
ma = a[0]
for i in range(m-1):
    if ma <= a[i+1]:
        n += 1
        ma = a[i+1]

print(n)

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





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

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

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

for i in h:
  if i >= ma:
    count += 1
    ma = i 

print(count)

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

cnt = 0
m = 0
for x in h:
    if m <= x:
        cnt+=1
        m=x

print(cnt)

Solution (Python):
n = int(input())
listH=list(map(int, input().split()))
index=0
count=0
max=0
while index < n:
    if listH[index] >= max:
        count+=1
        max = listH[index]
    index+=1
print(count)

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

ans = 0
max_h = 0
for i in h:
  if i >= max_h:
    ans += 1
    max_h = i
    
print(ans)

Solution (Python):


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

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



if __name__ == "__main__":
    solve()

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

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

print(ans)

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


H_max = 0
ans = 0
for h in H:
    if H_max <= h:
        H_max = h
        ans += 1

print(ans)

Solution (Python):

import sys
INF = float("inf")


def solve(N: int, H: "List[int]"):

    ans = 0
    minh = -INF
    for h in H:
        if h >= minh:
            ans += 1
            minh = h
    print(ans)
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    H = [int(next(tokens)) for _ in range(N)]  
    solve(N, H)


if __name__ == '__main__':
    main()

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

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

m=0
ct=0
for i in range(N):
	if m<=h[i]:
		ct+=1
	m=max(m,h[i])
print(ct)

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

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

Solution (Python):

import sys


def solve(N: int, H: "List[int]"):
    ret = 0
    for i in range(N):
        no = False
        for j in range(0, i):
            if H[i] < H[j]:
                no = True
                break
        if not no:
            ret += 1
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    H = [ int(next(tokens)) for _ in range(N) ]  
    solve(N, H)

if __name__ == '__main__':
    main()

Solution (Python):

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

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

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

cnt = 0
max_r = 0

for h in h_list:
    if max_r <= h:
        cnt += 1
    max_r = max(max_r, h)

print(cnt)

Solution (Python):
n = int(input())
h = [ int(i) for i in input().split() ]
ans = 0
for i in range(0,n):
    stat = True
    for j in range(0,i):
        if h[j] > h[i]:
            stat = False
            break
    if stat:
        ans += 1
print(ans)

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

Max = 0
ans = 0

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

print(ans)

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

print(c)

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

ans = 0
maxH = 0
for H in Hs:
    if maxH <= H:
        ans += 1
        maxH = H

print(ans)

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

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

print(ans)

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

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

result = 0

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

print(result)

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


ans = 0
highest = -1
for h in H_list:
    if highest <= h:
        ans +=1
        highest = h
    else:
        pass
    
print(ans)

Solution (Python):


from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

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

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

Solution (Python):
def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)


def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g

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

ma = 0
ct = 0
for a in arr:
    if ma <= a:
        ma = a
        ct +=1

print(ct)

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

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

print(ans)

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

Solution (Python):
N = int(input())
ms = list(map(int, input().split()))
last = 0
cnt = 0
for mt in ms:
  if mt >= last:
    cnt += 1
    last = mt
print(cnt)

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

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

Solution (Python):
N, *H = map(int, open(0).read().split())
ans = 0
ma = H[0]
for i in range(N):
    if i == 0:
        ans += 1
    else:
        if ma <= H[i]:
            ans += 1
            ma = H[i]
print(ans)