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):
import re
import sys
from itertools import product

import numpy as np

sys.setrecursionlimit(200000)


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


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N = ii()
    H = il()
    first = H[0]
    count = 1
    for h in H[1:]:
        if first <= h:
            count += 1
            first = h
    return count


if __name__ == "__main__":
    print(solve())

Solution (Python):

n = int(input())
heights = list(map(int, input().split()))
highest = heights[0]
hotels = 1
for i in heights[1:]:
	if i >= highest:
		hotels += 1
		highest = i
print(hotels)

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

max_list = []
for i in range(n):
    if i == 0:
        max_list.append(height_list[i])
    else:
        if height_list[i] >= max_list[-1]:
            max_list.append(height_list[i])

print(len(max_list))

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

Solution (Python):
n = int(input())
hn = list(map(int, input().split(' ')))
cnt = 0
max_h = 0
for hi in hn:
  if max_h <= hi:
    cnt += 1
  max_h = max(max_h, hi)
print(cnt)

Solution (Python):

n = int(input())
data = list(map(int, input().rstrip().split()))
count = 1

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

Solution (Python):


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

can_view = [0]

for i in range(N):
    if i == 0:
        continue
    
    count = 0
    for j in range(i):
        if H[i] >= H[j]:
            count += 1
    
    if count == i:
        can_view.append(i)
print(len(can_view))

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

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

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

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

Solution (Python):

N = int(input())
Hi = input().split()
count = 0
H0 = 0

for i in range(N):
    if int(Hi[i]) >= int(H0):
        count += 1
        H0 = Hi[i]
print(count)

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

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

    ans += 1
print(ans)

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

Solution (Python):
n = int(input());hl = [int(n) for n in input().split()][:n];print(sum([1 for ln in[len([n for n in hl[:i] if n>hl[i]]) for i in range(n)] if ln == 0]))

Solution (Python):




def main():
    n = int(input())
    heights = list(map(int, input().split()))
    heights = heights[:n]

    if n < 1:
        print(0)
        return

    total = 1
    max_h = heights[0]
    for h in heights[1:]:
        if max_h <= h:
            total += 1
            max_h = h

    print(total)


if __name__ == '__main__':
    main()

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

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

	max_height = 0
	ans = 0
	for i in H:
		if i >= max_height : 
			max_height = i
			ans += 1

	print(ans)

Solution (Python):
str = input().split()
str2 = input().split()

a = int(str[0])

i = 1
b = int(str2[0])

for j in range(a-1):
    if b <= int(str2[j+1]):
        i = i + 1
        b = int(str2[j+1])
 
print(i)

Solution (Python):
N = int(input())
heights = list(map(int, input().split()))
max_height = heights[0]
can_sea = 1;
for i in range(N-1):
  if max_height <= heights[i+1]:
    max_height = heights[i+1]
    can_sea += 1
print("{}" .format(can_sea))

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

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

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

def check(num):
    for i in range(num):
        if heights[i] > heights[num]:
            return 0

    return 1

ans = 0

for i in range(n):
    if check(i) == 1:
        ans = ans + 1

print(ans)

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

ans = 0
for i in range(N):
    can_see = True
    for j in range(i):
        can_see &= (H[j] <= H[i])
    if can_see:
        ans += 1

print(ans)

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

Solution (Python):
N = int(input())
H = str(input())
ls_H = H.split(' ')
ls_H_i = [int(s) for s in ls_H]
MAX_H = ls_H_i[0]
count = 1
i = 2
while i <= N:
    if MAX_H <= ls_H_i[i-1]:

        count += 1
        MAX_H = ls_H_i[i-1]
    i += 1
print (count)

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

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

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

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

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

Solution (Python):
n = int(input())
h = list(map(int,input().split(' ')))
ans = 1
i = 1
h0 = h[0]
while i < n:
    if h[i] >= h0:
        ans += 1
        h0 = h[i]
    i += 1
print(ans)

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

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

a = L.pop(0)

ans = 1
for i in L:
    if i >= a:
        ans += 1
        a = i
        
print(ans)

Solution (Python):



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

count=0

for i,H in enumerate(H_list):
    is_view=True
    j=i
    while(is_view and j>0):
        if H_list[j-1]>H:
            is_view=False
        j=j-1
    if is_view:
        count=count+1

print(count)

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

H_m = 0
ans = 0
for H in Hs:
    ans += 1 if H_m <= H else 0
    H_m = max(H_m, H)

print(ans)

Solution (Python):


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

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

Solution (Python):
N = int(input())
arr = input().split()
num = 0
tmp = 0

for i in range(N):
	if int(arr[i]) >= tmp:
		num += 1
		tmp = int(arr[i])

print(num)

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

max_high = 0
count = 0
for high in data:
    if high >= max_high:
        count += 1
        max_high = high
print(count)

Solution (Python):
a = int(input())
ar = list(map(int,input().split(" ")))
count = 1
for i in range(1,a):
    br = ar[:i+1]
    if ar[i] >= max(br):
        count += 1
print(count)

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

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

print(count)

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

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

Solution (Python):
def is_seeable(H):
    if len(H) == 1:
        return True
    for h in H[:-1]:
        if h > H[-1]:
            return False
    return True

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

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

Solution (Python):

a = int(input())

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


t = array[0]

result = 1

for i in range(1, a):
    if array[i] >= t:
        t = array[i]
        result += 1

print(result)

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

total = 0
maxN = 0
for num in h:
  if  num >= maxN:
    total += 1
  
  maxN = max(maxN,num)

print(total)

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

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

ans = 0
k = 0
for h in H:
    if h >= k:
        ans += 1
    k = max(k, h)
print(ans)

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

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

print(cnt)

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

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

Solution (Python):
import sys
inp=[i.strip() for i in sys.stdin.readlines()]
if len(inp)==1:
    if len(inp[0].split())==2:
        A,B=map(int,inp[0].split())
        print(max(2*A-1,2*B-1,A+B))
    else:
        S=inp[0]
        N=len(S)
        X=""
        Y=""
        for i in range(N):
            if i%2==0:
                X=X+"0"
                Y=Y+"1"
            else:
                X=X+"1"
                Y=Y+"0"
        A=0
        B=0
        for i in range(N):
            if X[i]!=S[i]:
                A+=1
            if Y[i]!=S[i]:
                B+=1
        print(min(A,B))
else:
    if len(inp[0].split())==1:
        N=int(inp[0])
        H=[int(i) for i in inp[1].split()]
        ans=1
        for i in range(1,N):
            flag=1
            for j in range(i):
                if H[j]>H[i]:
                    flag=0
                    break
            if flag==1:
                ans+=1
        print(ans)
    else:
        N,K=map(int,inp[0].split())
        S=inp[1]
        L=[0]
        tmp="1"
        for i in range(N):
            if tmp!=S[i]:
                L.append(1)
            else:
                L[-1]+=1
            tmp=S[i]
        if tmp=="0":
            L.append(0)
        M=len(L)
        if M<=2*K+1:
            print(N)
            exit()
        X=[0 for i in range(M+1)]
        for i in range(M):
            X[i+1]=L[i]+X[i]
        ans=0
        for i in range(0,M-2*K,2):
            ans=max(ans,X[i+2*K+1]-X[i])
        print(ans)

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 998244353
def POW(x, y):
    if y == 0:
        return 1
    elif y == 1:
        return x
    elif y % 2 == 0:
        return POW(x, y // 2) ** 2 % MOD
    else:
        return POW(x, y // 2) ** 2 * x % MOD
def mod_factorial(x, y): return x * POW(y, MOD - 2) % MOD
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()
from collections import Counter

def main():
    N = II()
    H = LI()
    ma = 0
    ans = 0
    for h in H:
        if ma <= h:
            ans += 1
            ma = h

    return ans

print(main())

Solution (Python):




n = int(input())
points = list(map(int, input().split()))
ans = 1
need_height = points[0]


for i in range(1, n):
    current = points[i]
    if need_height <= current:
        ans += 1
        need_height = current


print(ans)

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

tmp_max = Hs[0]
cnt = 1
for n in range(1,N):
    if tmp_max<= Hs[n]:
        cnt += 1
        tmp_max = Hs[n]

print(cnt)

Solution (Python):




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

    max_ = float('-inf')
    num = 0

    for h in HS:
        if max_ <= h:
            max_ = h
            num = num + 1

    print(num)


if __name__ == '__main__':
    main()

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

hh = [h_list[0]]
ans = 1
for index, i in enumerate(h_list):
  if index == 0:
    continue;
  else:
    if i >= max(hh):
      ans+=1
  hh.append(i)
  
print(ans)

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

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

count = 0

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

print(count)

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

Solution (Python):
if __name__ == "__main__":
    N = int(input())
    ryokan= input().split(" ")
    total=1
    for x in range(1,N):
        flag=True
        for y in range(x):
            if int(ryokan[x])<int(ryokan[y]):
                flag=False
                break
        if flag:
            total+=1
                
    print(total)

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

count = 0

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

Solution (Python):
import sys
import math 

n = int(raw_input().strip())
inp = map(int, raw_input().strip().split(" "))
max = 0
ans = 0

for h in inp:
    if max <= h:
        max = h
        ans += 1

print(ans)

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

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

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

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

ans=0
max=h[0]
for i in h:
    if max <= i:
        ans+=1
        max=i

print(ans)

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



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

Solution (Python):

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

h_max = 0
count = 0

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

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

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

Solution (Python):


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

Solution (Python):
n = int(input())
num_list = list(map(lambda x: int(x), input().split(" ")))
count = 0
for i, num in enumerate(num_list):
    if num >= max(num_list[:i+1]):
        count += 1
print(count)

Solution (Python):




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

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

maxh = h[0]
count = 1

for i in range(1, len(h)):
    if h[i] < maxh:
        pass
    else:
        count += 1
        maxh = h[i]
print(count)

Solution (Python):
count = 0

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

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

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

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

print(r)

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

H = input().split()

H_int = []
for i in H:
    H_int.append(int(i))

view_capable = 0

max_height = H_int[0]

for j in H_int:
    if j >= max_height:
        view_capable += 1
        max_height = j

print(view_capable)

Solution (Python):
N  = input()
Hs = list(map(int,input().split(" ")))
limit = len(Hs)
ans = 0
for i in range(limit):
    h = Hs[i]
    flag = True
    for another in Hs[:i]:
        if h < another:
            flag = False
    if flag:
        ans += 1
print(ans)

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

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

max = h[0]
ans = 0

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

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

ans = 0
for i in range(N):
    flag = True
    for j in range(i):
        if H[i] < H[j]:
            flag = False
            break
    if flag:
        ans += 1
print(ans)

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

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

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

cnt = 0
for i in range(len(h)):
    if i == 0:
        cnt += 1
    else:
        for j in range(i):
            if h[i] < h[j]:
                break
        else:
            cnt += 1

print(cnt)

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

Solution (Python):
N=int(input())
dataH=[int(e) for e in input().split(' ')]
c=0
for i,H in enumerate(dataH):
  c=c+1 if max(dataH[:i+1])==H else c
print(c)

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

Solution (Python):
import math
import os
import random
import re
import sys
from collections import defaultdict




def count(n, h):
	count = 0
	if len(h) < 1:
		return count
	max = h[0]
	for i in h:
		if i >= max:
			max = i 
			count += 1

	return count

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

Solution (Python):

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

num_int = 1 
for i in range(1, N):
    j = 0
    while j < i and H[j] <= H[i]:
        j += 1
    if j == i:
        num_int += 1

print(num_int)

Solution (Python):

import numpy as np

def main():
    n=int(input())
    h = list(map(int, input().split()))
    cnt=1
    for i in range(1,n):
        for j in range(i):
            if(h[i]<h[j]):
                break
            if((j+1)==i):
                cnt=cnt+1
    print(cnt)

if __name__ == '__main__':
    main()

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

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

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

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

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

result = 0
diff = -1

for h in H:
  if diff <= h:
    result += 1
    diff = h
print(result)

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v

def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    N = int(input())
    H = li_input()

    hmax = H[0]
    ans = 1

    for h in H[1:]:
        if h >= hmax:
            ans += 1
            hmax = h
    
    print(ans)


main()

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

ans = 0
curmax = -1

for h in H:

    if curmax <= h:
        ans += 1
        curmax = h

print(ans)

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

"""
SEA H_1 H_2 H_3 H_4 ... H_N
"""




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

print(ret)

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

print(s)

Solution (Python):
def main():
    n = int(input())
    hs = map(int, input().rstrip().split(' '))
    highest = 0
    visible_count = 0
    for h in hs:
        if h >= highest:
            visible_count += 1
            highest = h
    print(visible_count)

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
h=[int(i) for i in input().split()]
s=0
hmax=h[0]
for k in range(n):
  if hmax <= h[k]:
    s =s+1
    hmax=h[k]
  else:
    continue
print(s)

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

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

print(ans)

Solution (Python):
n = int(input())
li = list(map(int,input().split()))
cnt = 0
high = 0

for i in range(n):
    if li[i] >= high:
        cnt += 1
        high = li[i]
print(cnt)

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

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

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

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

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

Hmax=0
R=0
for Hi in H:
    if Hmax<=Hi:
        R+=1
        Hmax=Hi

print(R)

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

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

print(a)

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

max=0
cnt=0

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

print(cnt)

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

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

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

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

print(see)

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

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

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

def comparison(x,y):
    count1 = 0
    for t in range(0,y):
        if(x - list[t] >= 0):
            count1 = count1 + 1

    
    if(count1 == y):
        return 1
    else:
        return 0


answer = 1

for i in range(1,n):
    answer = answer + comparison(list[i],i)

print(answer)

Solution (Python):
from sys import stdin
n = int(stdin.readline().rstrip())
h = [int(x) for x in stdin.readline().rstrip().split()]
ans = 1
tmp = h[0]
for i in range(n - 1):
    ans += 1 if tmp <= h[i + 1] else 0
    tmp = max(tmp, h[i + 1])
print("{}".format(ans))

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

Solution (Python):
import numpy as np


if __name__ == '__main__':
    N = int(input())
    heights = np.array([int(x) for x in input().split(' ')])
    max_height = heights[0]
    num_viewable = 1
    for height in heights[1:]:
        if height >= max_height:
            num_viewable += 1
            max_height = height
    print(num_viewable)

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

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

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

    print(ans)
    
if __name__ == "__main__":
    Main()

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

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

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

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

Solution (Python):

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

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

bean = True
for i in range(1, n):
  bean = True
  for j in range(i, 0, -1):
    if l[j-1] > l[i]:
      bean = False
  if bean:
    c += 1

print(c)

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

Solution (Python):
_ = input() 
lst = [int(i) for i in  input().split()]
height = 0
cnt = 0
for i in lst:
	if height <= i:
		height = i
		cnt += 1
print(cnt)

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

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

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

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

result = 0
now_max = 0

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

print(result)

Solution (Python):


n = int(input())

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

count = 1

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

print(count)

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

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

highest = 0
count = 0

for hi in H:
  if hi >= highest:
    count += 1
    highest = hi

print(count)

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