Problem:
 Score : 200 points    Problem Statement There are N mountains ranging from east to west, and an ocean to the west.  At the top of each mountain, there is an inn. You have decided to choose where to stay from these inns.  The height of the i -th mountain from the west is H_i .  You can certainly see the ocean from the inn at the top of the westmost mountain.  For the inn at the top of the i -th mountain from the west (i = 2, 3, ..., N) , you can see the ocean if and only if H_1 \leq H_i , H_2 \leq H_i , ... , and H_{i-1} \leq H_i .  From how many of these N inns can you see the ocean?      Constraints  All values in input are integers.  1 \leq N \leq 20  1 \leq H_i \leq 100         Input Input is given from Standard Input in the following format:  N  H_1  H_2  ...  H_N       Output Print the number of inns from which you can see the ocean.        Sample Input 1 4
6 5 6 8      Sample Output 1 3  You can see the ocean from the first, third and fourth inns from the west.       Sample Input 2 5
4 5 3 5 4      Sample Output 2 3       Sample Input 3 5
9 5 6 8 4      Sample Output 3 1

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

ans = 1
mx = H[0]
for i in range(1,N):
    if H[i] >= mx:
        ans += 1
        mx = H[i]
    else:
        continue
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 sys
input = sys.stdin.readline

import fractions 
sys.setrecursionlimit(1000000)

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


if __name__ == "__main__":
    main()

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

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

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

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

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

ma = arr[0]
cnt = 1

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

	ma = max(ma, arr[i])

print (cnt)

Solution (Python):

import logging
logging.basicConfig(level=logging.DEBUG)
logging.disable(logging.CRITICAL)

def main():
    N = int(input())
    H = list(map(int, input().split()))
    
    ans = 1
    for i in range(1, N):
        flag = 0
        for j in range(i):
            if H[i] < H[j]:
                flag += 1
            else:
                continue
        logging.debug('flag: {}'.format(flag))
        if flag == 0:
            ans += 1

    return ans

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

Solution (Python):


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

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

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

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

Solution (Python):

n = int(input())

h = list(map(int, input().split()))
cou = 1
for i in range(1, n):
    if not max(h[:i+1]) == h[i]:
        continue

    if not h[i-1] <= h[i]:
        continue

    cou+=1

print (cou)

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

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

ans = 1
max_n = n_list[0]

for i in n_list[1:]:
 if i >= max_n:
  max_n = i
  ans += 1

print(ans)

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

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

ans = 0
r = 0
for h in h_seq:
    if h >= r:
        ans += 1
        r = h

print(ans)

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


if __name__ == '__main__':
    main()

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

highest_before = 0
score = 0

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

print(score)

Solution (Python):
def main():
    N = int(input())
    H = [int(h) for h in input().split()]
    max_h = 0
    count = 0
    for i in range(N):
        if H[i] >= max_h:
            count += 1
        max_h = max(max_h, H[i])
    return count

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

Solution (Python):
def test():
    n = int(input())
    a = list(map(int,input().split()))
    b = [a[0]]
    count = 1
    for i in range(1,n):
        for j in range(i):
            b.append(a[j])
        if all(x <= a[i] for x in b):
            count += 1

    print(count)


if __name__ == "__main__":
    test()

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

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

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

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

print(count)

Solution (Python):

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

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 = H[i]

print(ans)

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

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

ans = 0
r = 0
for h in h_seq:
    if h >= r:
        ans += 1
        r = h

print(ans)

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

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

count = 0
max_h = H[0]
for i in H:
    if i >= max_h:
        count += 1
        max_h = i

print(count)

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

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

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

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

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

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
    else:
        pass
print(ans)

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

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

print(ans)

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

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

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

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

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

print(ans)

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

Solution (Python):
n,*h=map(int,open(0).read().split())

max_val = -float('inf')
cnt=0
for h_ in h:
  if max_val <= h_:
    cnt+=1
    max_val=h_
print(cnt)

Solution (Python):
n = int(input())
H = list(map(int, input().split()))
ans = 0
for i in range(n):
    see = True
    for j in range(i):
        if H[j] > H[i]:
            see = False
            break
    if see:
        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):
import math
import copy

inputa = input().split()
inputb = input().split()


a = int(inputa[0])














b = [int(n) for n in inputb]


sum = 0
for i in range(len(b)-1, -1, -1):
    flg = True
    for j in range(i):
            if b[j] > b[i]:
               flg = False
               break
    if flg == True:
        sum += 1

print(sum)

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

print(ans)

Solution (Python):
n=int(input())
h1=input().split()
h2=[]
for i in range(n):
    h2.append(int(h1[i]))

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

print(c)

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

H.reverse()

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

print(count)

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

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

print(c)

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

num = 0
max1 = li[0]
for i in range(n):
    if li[i] >=max1:
        max1 = li[i]
        num += 1

print(num)

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

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

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

view = 0
cnt = 0
for i in range(n):
  if hotels[i] >= view:
    cnt += 1
    view = hotels[i]
    
print(cnt)

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


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

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

Solution (Python):
n = int(input())
*l, = map(int,input().split())
ans = 0
for i in [0]*n:
  if max(l) == l[-1]:
    ans += 1
  del l[-1]
print(ans)

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

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

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

print(cnt)

Solution (Python):



from collections import deque

N = int(input())
a = deque(list(map(int, input().split())))
tmp = 0
ctr = 0

for i in range(N):
    tmp = a.pop()
    if a == deque([]):
        ctr += 1
    elif max(a) <= tmp:
        ctr += 1
print(ctr)

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

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

max_height = 0
answer = 0

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

print(answer)

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

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

Solution (Python):



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


ans = 1
for i in range(1, N):
    flag = True
    for j in range(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()))

def can_see_sea(i):
    hi = H[i]
    for h in H[0:i]:
        if h > hi:
            return False
    return True

count = 0

for i in range(N):
    if can_see_sea(i):
        count += 1

print(count)

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

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

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

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

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()))
count=0
flag=1
for i in range(N):
    flag=1
    for j in range(i):
        if H[i]<H[j]:
            flag=0
            break
    if flag==1:
        count+=1
print(count)

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

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

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

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

print(ans)

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

Solution (Python):

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

count = 0
max_mount = -1
for i in range(len(Hs)):
    if max_mount <= Hs[i]:
        count += 1
        max_mount = Hs[i]

print(count)

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

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

Solution (Python):

def main():
    n = int(input())
    l = list(map(int, input().split()))
    count = 1

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

    print(count)

if __name__ == '__main__' :
    main()

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

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

M = H[0]
ans = 0
for h in H:
    if h < M:
        continue
    ans += 1
    M = h

print(ans)

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

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

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

print(ans)

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

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

print(ans)

Solution (Python):
def solve(string):
    n, *h = map(int, string.split())
    count = 1
    for i in range(1, n):
        if max(h[:i]) <= h[i]:
            count += 1
    return str(count)


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))

Solution (Python):

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

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

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

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

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

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

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

print(count)

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

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

    h_max = max(h_max, h[i])

print(ans)

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

ans = 1
mx = H[0]

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

Solution (Python):
N = 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()))
count = 1
left = h[0]
for i in range(1,N):
    if h[i] >= left:
        count += 1
        left = h[i]
print(count)

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

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

temp = 0
cnt = 0
for x in li:
    if x >= temp:
        temp = x
        cnt += 1
print(cnt)

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

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

print(ans)

Solution (Python):

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

max_height = 0
result = 0
for height in heights:
    if max_height <= height:
        result += 1
        max_height = height
print(result)

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

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

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

Solution (Python):

import sys


def get_num():
    return int(input())


def get_nums(n):
    res = [0 for _ in range(n)]
    for i in range(n):
        res[i] = int(input())
    return res


def get_numbers():
    return map(int, input().split())

n = get_num()
h = list(get_numbers())

highest = 0
ans = 0
for height in h:
    if height >= highest:
        highest = height
        ans += 1

print(ans)

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

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

tmp = n[0]
sum1=1
for i in range(1,S):
  if tmp <= n[i]:
    tmp=n[i]
    sum1=sum1+1
print(sum1)

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

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

Solution (Python):
def check(N, H):
    max_mount = 0
    count = 0
    mountList = H
    
    for i in mountList:
        if i >= max_mount:
            count += 1
            max_mount = i
    print(count)

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

Solution (Python):
def q39(n, h):
    count = 1
    for i in range(1, n):
        if h[i] >= max(h[:i]):
            count += 1
    return count


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

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):
def check():
    max_mount = 0
    count = 0
    N = int(input())
    mountList = list(map(int, input().split(" ")))
    
    for i in mountList:
        if i >= max_mount:
            count += 1
            max_mount = i
    print(count)
 
check()

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


count = 1
max = h[0]

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

print(count)

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

for i in range(1,n):
    if ma <= h[i]:
        ma=h[i]
        an+=1
    
print(an)

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

lft=x[0]

y=x[1:]

res=1

for i in range(n-1):
	if y[i]>=lft:
		lft=y[i]		
		res+=1

print(res)

Solution (Python):


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

cnt = 1
top = H[0]

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

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

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

Solution (Python):
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''

gi = lambda : list(map(int,input().strip().split()))
n, = gi()
l = gi()
ans = 0
m = -1
for e in l:
	if e >= m:
		m = e
		ans += 1
print(ans)

Solution (Python):
import numpy as np

N = int(input())
H_list = list(map(int,input().split()))[::-1]

cnt = 0
for i in range(N):
  temp_H_list = H_list[i:]

  if np.argmax(temp_H_list)==0:
    cnt+=1
    
print(cnt)

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

res = 0

for i in range(n):
    temp = 1
    for j in range(i):
        if mountains[j] > mountains[i]:
            temp -= 1
            break
    res += temp

print(res)

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

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

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

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

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(map(int,input().split()))
count = 0
ans = 0
sum_h = 0

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

Solution (Python):
N = int(input())
hotel = list(map(int,input().split()))
new =[]

count = 0
for i in hotel:
  new.append(i)
  if i == max(new):
    count += 1
print(count)

Solution (Python):
N = int(input())
Hlist = list(map(int, input().split()))
count=0
maxHi=1
for i in range(N):
    if Hlist[0] >= maxHi:
        count+=1
        maxHi=Hlist.pop(0)
    else:
        del Hlist[0]
print(count)

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

maxmount = 0
count = 0
for i in H:
    if maxmount <= i:
        maxmount = i
        count += 1

print(count)

Solution (Python):

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

    ans = 0
    m = 0
    for i in a:
        if m <= i:
            ans += 1
        m = max(m,i)

    print(ans)








main()

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

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

print(ans)

Solution (Python):
n = int(input().split()[0])
h_list = list(map(int, input().split()))
c = 1

for i, h in enumerate(h_list[1:]):
    pre_max = max(h_list[:i+1])
    if pre_max <= h:
        c += 1

print(c)

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

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

Solution (Python):

n = int(input())
H = [int(el) for el in input().split(' ')]

count = 1
max_h = H[0]
for i in range(1, n):
    if H[i] - max_h >= 0:
        count += 1
        max_h = H[i]

print(count)

Solution (Python):

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

res = 0
mx = 0
for h in hs:
    if h >= mx:
        res += 1
    mx = max(h, mx)
print(res)

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

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

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

ans = 0
max_H = 0
for H in H_arr:
    if H >= max_H:
        ans += 1
    max_H = max(max_H, H)

print(ans)

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

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

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

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

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

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

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

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

no_ocean = 0

for i in range(n):
  for k in range(i+1):
    if height[k] > height[i]:
      	no_ocean += 1
      	break
    else:
        continue
        
print(n - no_ocean)

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

print(answer)

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

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

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

M = [0] * N
M[0] = 0

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

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

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

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

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

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

count = 0
max1 = 0

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

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

Solution (Python):
"""


 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  


a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 
"""

import math
import sys
import itertools
import queue
from fractions import gcd

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

mod = 1000000007

if __name__ == "__main__":
    n = int(sys.stdin.readline())
    a = list(map(int, sys.stdin.readline().split()))
    c=1
    for i in range(1,n):
        if a[i] is max(a[:i+1]):
            c+=1
    print(c)

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

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

print(counter)

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

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

print(ans)

Solution (Python):
n=int(input())
h=[int(x) for x in 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(map(int,input().split()))
sh = []
max_h = 0
for i in range(0,n):
    max_h = max(h[i],max_h)
    sh.append(max_h)

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

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

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

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

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

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

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

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

mountain = int(1)
for i in range(1, n):
    for j in range(i):
        if int(L[j]) > int(L[i]):
            break
        if int(L[j]) <= int(L[i]) and j == i-1:
            mountain += 1
            break
        if int(L[j]) <= int(L[i]):
            continue

print(mountain)

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

cnt = 1

temp = H[0]

for i in range(1, n):
    if temp <= H[i]:
        temp = H[i]
        cnt += 1

print(cnt)