#include <bits/stdc++.h>
using namespace std;
int N;
int result = 1;
int main() {
  cin >> N;
  vector<int> height(N);
  for (int i = 0; i < N; i++) {
    cin >> height[i];
  }
  for (int i = 1; i < N; i++) {
    bool view = true;
    for (int j = 0; j < i; j++) {
      if (height[j] > height[i]) {
        view = false;
        break;
      }
    }
    if (view) {
      result++;
      cout << height[i] << endl;
    }
  }
  cout << result;
}
