#include <bits/stdc++.h>
#define mod 1000000007
#define lng long long
using namespace std;
const double PI = 3.141592;
const lng int INF_LL = (lng)(1e18);
const int INF = 0x7fffffff;
int main(){
std::ios::sync_with_stdio(false);
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
int n;
cin>>n;
int arr[n+1],pos[n+1],neg[n+1];
for(int i=1;i<=n;i++){
cin>>arr[i];
}
pos[0]=0;
neg[0]=0;
for(int i=1;i<=n;i++){
if(arr[i]<0){
neg[i]=neg[i-1]+1;
pos[i]=pos[i-1];
}
else if(arr[i]>0){
pos[i]=pos[i-1]+1;
neg[i]=neg[i-1];
}
else{
neg[i]=neg[i-1];
pos[i]=pos[i-1];
}
}
int ans=INF;
for(int i=1;i<n;i++){
ans=min(ans,n-neg[i]-pos[n]+pos[i]);
}
cout<<ans<<endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgbW9kIDEwMDAwMDAwMDcKI2RlZmluZSBsbmcgbG9uZyBsb25nCgp1c2luZyBuYW1lc3BhY2Ugc3RkOwpjb25zdCBkb3VibGUgUEkgPSAzLjE0MTU5MjsKY29uc3QgbG5nIGludCBJTkZfTEwgPSAobG5nKSgxZTE4KTsKY29uc3QgaW50IElORiA9IDB4N2ZmZmZmZmY7CgppbnQgbWFpbigpewoJc3RkOjppb3M6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CglmcmVvcGVuKCJpbnB1dC50eHQiLCJyIixzdGRpbik7CglmcmVvcGVuKCJvdXRwdXQudHh0IiwidyIsc3Rkb3V0KTsKCWludCBuOwoJY2luPj5uOwoJCWludCBhcnJbbisxXSxwb3NbbisxXSxuZWdbbisxXTsKCglmb3IoaW50IGk9MTtpPD1uO2krKyl7CgkJY2luPj5hcnJbaV07Cgl9Cglwb3NbMF09MDsKCW5lZ1swXT0wOwoKCWZvcihpbnQgaT0xO2k8PW47aSsrKXsKCQlpZihhcnJbaV08MCl7CgkJCW5lZ1tpXT1uZWdbaS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