#include <bits/stdc++.h>
using namespace std;
long long t;
long long x[1000100];
long long temp;
long long ans;
long long mem[10000100];
long long dfs(long long n, long long r) {
  if (t == n) ans = 1;
  if (mem[n] != 0) ans = mem[n];
  if (n == 0)
    ans = 1;
  else if (r >= x[n])
    ans = dfs(n - 1, r);
  else {
    ans = max(dfs(n - 1, x[n]) + 1, dfs(n - 1, r));
  }
  return mem[n] = ans;
}
signed main() {
  cin >> t;
  for (long long i = 0; i <= t; i++) mem[i] = -1;
  for (long long i = 1; i <= t; i++) cin >> x[i];
  cout << dfs(t, x[1]) << endl;
  return 0;
}
