#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int f(vector<int>a, vector<int>b){
    int g=0;
    int cfn=0;
    for(d:a){
        if(d<=g) break;
        g++;
        cfn++;}
    for(d:b){
        if(d<=g) break;
        g++;
        cfn++;}
    return cfn;
}
int main()
{
    int n;
    cin>>n;
    vector<int> h, vector<int> m;
    for(int i=o; i<n; i++){
        int p;
        cin>>p;

        if(p<0)
        h.push_back(p);
        else if(p>0)
        m.push_back(p);
    }
    sort(h.begin(), h.end())
    sort(m.begin(), m.end())
    int bcs=max(f(h,m), f(m,h))
return 0;
}