#include<bits/stdc++.h>
using namespace std;
main(){
int n,i,j;
while(cin>>n){
int arr[n],abso[n];
for(i=0;i<n;i++) cin>>arr[i],abso[i]=abs(arr[i]);
int tmp=0;
for(j=n;j>0;j--){
for(i=1;i<j;i++) if(abso[i-1]>abso[i]){
tmp=abso[i-1],abso[i-1]=abso[i];
abso[i]=tmp,tmp=arr[i-1];
arr[i-1]=arr[i],arr[i]=tmp;
}
}
for(i=1,tmp=0;i<n;i++){
if((arr[i]>0&&arr[i-1]<0)||(arr[i]<0&&arr[i-1]>0)) tmp++;
}
cout<<tmp<<endl;
}
}