//dfs秒了
#include<iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include<vector>
using namespace std;

const int MAXN = 120;
const int INF = 1e6;
vector<int>height_list;
int max_count;
void dfs(int index, int max_height, int n_counts) {
    if (index == height_list.size()) {
        max_count = max(max_count, n_counts);
    } else {
        if (max_height >= height_list[index]) {
            dfs(index + 1, height_list[index], n_counts + 1);
        }
        dfs(index + 1, max_height, n_counts);
    }
}
int main() {
    max_count = 0;
    int K;
    scanf("%d", &K);
    for (int i = 0; i < K; i++) {
        int height;
        scanf("%d", &height);
        height_list.push_back(height);
    }
    dfs(0, INF, 0);
    printf("%d", max_count);


}