#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  int N, x1, c = 1;
  cin >> N >> x1;
  for (int i = 0; i < (int)(N - 1); i++) {
    int x2;
    cin >> x2;
    if (x1 <= x2) {
      x1 = x2;
      c++;
      cout << x1;
    }
  }
  cout << c;
}
