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

Solution (Python):
from sys import stdin
from collections import deque, defaultdict as ddic
from itertools import combinations, permutations, product
import bisect
import heapq

rs = lambda: stdin.readline().strip()
ri = lambda: int(rs())
rsl = lambda: stdin.readline().split()
rim = lambda: map(int, rsl())
ril = lambda: list(rim())

n = ri()
heights = rim()
ans = 0
maximum = float('-inf')
for h in heights:
    if h >= maximum:
        ans += 1
        maximum = h

print(ans)

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

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

Solution (Python):

def main():
    n = int(input())
    h = [int(i) for i in input().split()]
    ans = 0
    for i in range(n):
        if h[i] >= max(h[:i+1]):
            ans += 1
    print(ans)

main()

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

ans = 1
for i in range(1, N):
    for j in range(i):
        if h[i] < h[j]:
            break
    else:
        ans += 1
print(ans)

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [tuple(map(int, l.split())) for l in sys.stdin]
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 I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)

def main():
    n = I()
    a = LI()
    r = 1
    m = a[0]
    for i in range(1,n):
        if m <= a[i]:
            r += 1
            m = a[i]

    return r


print(main())

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

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

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

print(ans)

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

for i in H:
    if i >= tmp:
        cnt += 1
        tmp = i

print(cnt)

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

max=0;
answer=0;

for i in A:
    if(max<=i):
        answer+=1;
        max=i;

print(answer);

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


if __name__ == "__main__":
    main()

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

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

print(ans)

Solution (Python):
n,*a=map(int,open(0).read().split())
p=0
c=0
for i in range(n):
    if p<=a[i]:
        c+=1
        p=a[i]
print(c)

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

Solution (Python):
import sys






"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)


"""ここからメインコード"""


def main():
    
    r, e, p = range, enumerate, print
    ip = IP()
    id = Idea()
    mod = 10 ** 9 + 7

    """この下から書いてね"""
    n = ip.I()
    h = ip.IL()
    ma = 0
    ans = 0
    for x in h:
        if x >= ma:
            ans += 1
        ma = max(ma, x)
    p(ans)


main()

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

ma = 0
Ans = 0
for i in H:
  if i >= ma:
    ma = i
    Ans += 1

print(Ans)

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

limit, count = 0, 0
for h in H:
    if h >= limit:
        count += 1
    limit = max(limit, h)

print count

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    a,b = LI()
    if a == b:
        print(2*a)
    else:
        print(2*max(a,b)-1)
    return


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


def C():
    n = I()

    return


def D():
    n = I()

    return


if __name__ == "__main__":
    B()

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

maxi = arr[0]
ans = 0
for num in arr:
    if maxi > num:
        pass
    else:
        ans += 1
        maxi = num

print(ans)

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

ans = 1
tmp = H[0]

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

print(ans)

Solution (Python):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
h = list(li())
hmax = 0

ans = 0
for hi in h:
    if hi >= hmax:
        ans += 1
        hmax = hi
print(ans)

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

mx = 0
ans = 0
for hi in h:
    if mx <= hi:
        ans += 1
        mx = hi
print(ans)

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime,random
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

N = int(input())
H = inpl()

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

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

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

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

print (ans)

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

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

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

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

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

Solution (Python):
n = int(input())
hhh = list(map(int, input().split()))
tmp = -1

ans = 0
for h in hhh:
    if h >= tmp:
        ans += 1
        tmp = h
print(ans)