#include <iostream>
using namespace std;
void main()
{
	int n, pos = 0, zero = 0, neg;
	float c, les, q;
	cin >> n;
	q = n;
	if (n % 2 == 0)
		les = n / 2;
	else
		les = q / 2 + 0.5;
	for (int i = 0; i < n; i++)
	{
		cin >> c;
		if (c>0)
			pos++;
		if (c == 0)
			zero++;
	}
	neg = n-(pos + zero);
	if (pos - zero >= les || pos >= les)
	{cout << 1 << endl;	return;}
	if (neg>=les||(neg>pos&&neg>zero&&neg>=les))
	{cout << -1 << endl;	return;}
	if (zero > les ||neg<les&&pos<les )
	{	cout << 0 << endl;return;}
	//AnOoS
}

#include<stdio.h>
#include<algorithm>
#include<stdlib.h>
#include<iostream>
#include<assert.h>
using namespace std;
#define  mod  998244353
int  main()
{
	int  n;
	cin>>n;
	int  *arr;
	arr=new int[n+1];
	int   half=(n/2+0.5);
	int   p=0;
	int   np=0;
	int  zero=0;
	for(int  i=1;i<=n;i++)
	{
		cin>>arr[i];
		if(arr[i]==0)
			zero++;
		else  if(arr[i]<0)
			np++;
		else
			p++;
	}
	if(p>=zero+np)//正数多
	{
		cout<<"1";
	}
	else   if(np>=zero+p)//负数多
	{
		cout<<"-1";
	}
	else
		cout<<"0";
	//system("pause");
	return  0;
}

#include<bits/stdc++.h>
using namespace std;
int n;
int a[110];
int main()
{
    cin>>n;
    for(int i=1;i<=n;i++) cin>>a[i];
    for(int i=-1000;i<=1000;i++)
    {
    	if(i==0) continue;
    	int sum=0;
    	for(int j=1;j<=n;j++)
    	{
    		if(a[j]*i>0) sum++;
		}
		if(2*sum>=n)
		{
			cout<<i;
			return 0;
		}
	}
	cout<<0;
	return 0;
}

#include<bits/stdc++.h>

using namespace std;
int main()
{
    int n,count=0,countn=0;
    double need;
    cin>>n;
    vector<int> vec(n);
    for(int i=0;i<n;i++)
    {
        int temp;
        cin>>temp;
        vec.push_back(temp);
        if(temp>0)
        {
            count++;
        }
        if(temp<0)
        {
            countn++;
        }
    }

    need=ceil(n/2.0);

   // cout<<need<<endl;
    if(count>=need)
    {
        cout<<1<<endl;

    }
    else if(countn>=need)
    {
        cout<<-1<<endl;
    }
    else
    {
        cout<<0<<endl;
    }
}

#include <iostream>

using namespace std;

int main()
{
    int n;
    cin>>n;
    int a[100001];
    for(int i=0;i<n;i++)
        cin>>a[i];
    int cnt_pos = 0,cnt_neg = 0;
    int mod;
    if(n%2 == 0)
        mod = n/2;
    else
       mod = n/2 +1;
    for(int i=0;i<n;i++)
    {
        if(a[i] > 0)
            cnt_pos++;
        else if(a[i]<0)
            cnt_neg++;
    }
    if(cnt_pos >= mod)
        cout<<"1";
    else if(cnt_neg >= mod)
        cout<<"-1";
    else
        cout<<"0";

}

#include <iostream>

using namespace std;

int main(){
	int x, countP, countN, positive;

	while(cin >> x){
		countP = 0;
		countN = 0;
		for(int i = 0; i < x; i++){
			cin >> positive;
			if(positive > 0)
				countP ++;
			else if(positive < 0)
				countN ++;
		}

		if(countP >= (x + 1) / 2)
			cout << "1" << endl;
		else if(countN >= (x + 1) / 2)
			cout << "-1" << endl;
		else
			cout << "0" << endl;
	}

}

#include <iostream>

using namespace std;

int main()
{
int n,ans,num1=0,num2=0,num;
cin>>n;
int a;
for(int i=0;i<n;i++)
{
    cin>>a;
    if(a>0)
        num1++;
    else if (a<0)
        num2++;
}
if(num1>num2)
    {
        num=num1;
        ans=num1;
    }
else
{
 ans=-num2;
 num=num2;
}
    if(n%2==0)
    {
        if(n/2<=num)
            cout<<ans;
        else
            cout<<0;
    }
    else
        {
            if((n/2)+1<=num)
                cout<<ans;

            else
                cout<<0;

        }

    return 0;
}

#include<vector>
#include<string>
#include<math.h>
#include<algorithm>
#include <iostream>
#include <iomanip>
#include <random>
using namespace std;
#define FOR(n) for(int i=0;i<n;++i)
#define FORj(n) for(int j=0;j<n;++j)
#define FOR(m) for(int i=0;i<m;++i)
#define FORj(m) for(int j=0;j<m;++j)
#define pb push_back
#define ll long long
#define vecI vector<int>
#define vecII vector<vector<int>>
#define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

int main()
{
	ll n,a,p=0,q=0,time=0;
	for(ll i=0;i<1e18;++i) time++;
	if(time==0) return 0;
	cin >> n;
	FOR(n)
	{
		cin >> a;
		if (a > 0) p++;
		if (a < 0) q++;
	}
	if (p >= (n + 1) / 2) cout << 1;
	else if (q >= (n + 1) / 2)cout << -1;
	else cout << 0;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int arr[n];
    int pos_int = 0;
    int neg_int = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> arr[i];
        if(arr[i] > 0)
        {
            pos_int++;
        }
         if(arr[i] < 0)
        {
            neg_int++;
        }
    }
    int comp_val = 0;
    if(n % 2 == 0)
    {
         comp_val = n / 2;
    }
    else
    {
        comp_val = (n / 2) + 1;
    }
    if(pos_int >= comp_val)
    {
        cout << 1 ;
    }
    else if (neg_int >= comp_val)
    {
        cout << -1;
    }
    else
    {
        cout << 0;
    }
    return 0;
}

#include <iostream>
using namespace std;
int main()
{
	int N[100];
	int n,pos=0,neg=0,d=0;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> N[i];
		if (N[i]>0)pos++;
		if (N[i] < 0)neg++;
	}
	if (n % 2 == 0)
	{
		if (pos>=(n / 2)) d = 1;
		if (neg >= (n / 2)) d = -1;
	}
	else
	{
		if (pos>=(n / 2)+1) d = 1;
		if (neg >= (n / 2)+1) d = -1;
	}
	cout << d << endl;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,p=0,l=0;
    cin>>n;
    int a[222];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]>0)
        p++;
        if(a[i]<0)
        l++;
    }
    int k=(n+1)/2;
    if(p>=k)
        {cout<<1;return 0;}
    if(l>=k)
    {cout<<-1;return 0;}

    else cout<<0;

}

#include <iostream>
using namespace std;
int zheng=0,fu=0;
int main(){
	int i,j,k,n;
	cin>>n;
	for(i=1;i<=n;i++){
		cin>>k;
		if(k>0)zheng++;
		if(k<0)fu++;
	}
	if(zheng<n*1.0/2&&fu<n*1.0/2){
		cout<<0<<endl;
		return 0;
	}
	else if(zheng>fu)cout<<1<<endl;
	else cout<<-1<<endl;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define sd second
#define fst first
#define lp(i,n) for(int x=i;x<n;x++)
#define pb push_back
#define PI 3.14159265
#define maxn 100010
//#define mp make_pair
#define inf 0x3f3f3f3f
vector<int>g[10005];
int dy[8]= {1,0,-1,1,0,-1,1,-1};
int dx[8]= {1,1,1,-1,-1,-1,0,0};
int fre[101];

map<int, pair<int,int> >mp;int main()
{
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    int n,m,k;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++)cin>>a[i];
    int x=ceil(n/2.0);
    for(int i=-1000;i<=1000;i++)
    {
        int v=0;
        if(i!=0)
        {for(int j=0;j<n;j++)
        {
            double c=((a[j]*1.0)/(i*1.0));
            if((c)>0.0)v++;
        }
        if(v>=x)
        {
            cout<<i;return 0;
        }
        }
    }

    cout<<0;
    return 0;
}

#include<iostream>
#include<algorithm>
#include<map>
#include<string>
#include<vector>
#include<set>
#include<queue>
#include<stack>
using namespace std;
#define fo(a,b) for(int i = a;i<b;i++)
#define fori(i,n) for(int i=0;i<n;i++)
#define forr(i,a,b) for(int i=a;i<=b;i++)
#define ll long long
#define N 501
#define mp make_pair
#define NMAX 200007
//#define x first
//#define y second
typedef pair<int, int> pii;
typedef vector<int> arr1D;
typedef vector<arr1D> arr2D;
void Arr2DInit(arr2D &a, int n, int m)
{
	a.resize(n);
	for (int i = 0; i < n; i++)
		a[i].resize(m);
}
template<class T>
T minn(T a, T b)
{
	return a < b ? a : b;
}
template<class T>
T maxx(T a, T b)
{
	return a > b ? a : b;
}

ll Pow(ll a, ll n)
{
	if (n == 0)
		return 1;
	if (n == 1)
		return a;
	if (n % 2 == 0)
		return Pow(a, n / 2)*Pow(a, n / 2);
	else return Pow(a, n / 2)*Pow(a, n / 2)*a;
}
///////////////////////////// Le Chi Nhin 17CTT5 HCMUS /////////////////////////////////////////////
//const int dx[] = { -1,0,1,1,1,0,-1,-1 };
//const int dy[] = { 1,1,1,0,-1,-1,-1,0 };
///////////////////////////// I love U (KLy) //////////////////////////////////////////////////////
///////////////////////////// in the moments //////////////////////////////////////////////////////
//
const int dx[] = { 0,0,1,-1 };
const int dy[] = { 1,-1,0,0 };
string direct = "UDRL";
//

vector<int>g[NMAX];
vector<pii>edge;
int mark[NMAX];
//bool impos = false;

int Upperint(int n)
{
	if (n % 2 == 0)
		return n / 2;
	else return n / 2 + 1;
}

int main()
{
	//A. Diverse Strings
	//
	int n, x, pos = 0, neg = 0;
	cin >> n;
	fori(i, n)
	{
		cin >> x;
		if (x > 0)
			pos++;
		else if (x < 0)
			neg++;
	}
	if (pos >= Upperint(n))
		cout << 1;
	else if (neg >= Upperint(n))
		cout << -1;
	else cout << 0;
	//system("pause");
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0),cout.tie(0);
    long long n,x;
    cin>>n;
    vector<long long >v;
    vector<long long >q;
    long long s;
    if(n%2==0)
    {
        s=n/2;
    }
    else
    {
        s=(n/2)+1;
    }
    for(int i=0; i<n; i++)
    {
        cin>>x;
        if(x>0)
        {
            v.push_back(x);
        }
        else if (x<0)
        {
            q.push_back(x);
        }

    }
    if(v.size()>=s)
    {
        sort(v.begin(),v.end());
        cout<<v[0]<<endl;
    }
    else if (q.size()>=s)
    {
        sort(q.begin(),q.end());
        cout<<q[s-1]<<endl;
    }
    else
    {
        cout<<"0"<<endl;
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0),cout.tie(0);
    long long n,x,s;
    cin>>n;
    vector<long long >v;
    vector<long long >q;
    if(n%2==0)
    {
        s=n/2;
    }
    else
    {
        s=(n/2)+1;
    }
    for(int i=0; i<n; i++)
    {
        cin>>x;
        if(x>0)
        {
            v.push_back(x);
        }
        else if (x<0)
        {
            q.push_back(x);
        }

    }
    if(v.size()>=s)
    {
        sort(v.rbegin(),v.rend());
        cout<<v[s-1]<<endl;
    }
    else if (q.size()>=s)
    {
        sort(q.rbegin(),q.rend());
        cout<<q[s-1]<<endl;
    }
    else
    {
        cout<<"0"<<endl;
    }
    return 0;
}

#include <iostream>
#include <unordered_set>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;

#ifdef CODEFORCES_2019_02_16_3_H
int codeforces_2019_02_16_3() {
#else
int main() {
#endif
    int n;
    cin >> n;

    vector<int> input;
    int npos = 0;
    int nneg = 0;
    int nzer = 0;
    for (int i = 0; i < n; i++){
        int temp;
        cin >> temp;
        input.push_back(temp);
        if (temp > 0) npos++;
        else if (temp < 0) nneg++;
        else nzer++;
    }
    if ((double)npos >= (double)n / 2) {
        cout << 1 << endl;
        return 0;
    }
    if ((double)nneg >= (double)n / 2) {
        cout << -1 << endl;
        return 0;
    }
    cout << 0 << endl;
    return 0;
}

#include<iostream>
#include<algorithm>
#include<set>
#include<stdio.h>
#include<vector>
#include<string>
#include<stack>
#include<cmath>
using namespace std;
int main()
{
	int a, pos = 0, neg = 0, n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a;
		if (a > 0)pos++;
		else if (a < 0)neg++;
	}

	if (pos >= ceil(n / 2.0))
		cout << 1 << endl;
	else if (neg >= ceil(n / 2.0))
		cout << -1 << endl;
	else
		cout << 0 << endl;
	return 0;
}

#include <iostream>
#include <vector>
using namespace std;
int main(){
    int num;
    cin>>num;
    bool is_even=(num%2==0);
    vector <int> numbers;
    int pos=0,neg=0;
    for (int i=0;i<num;i++){
        int temp;
        cin>>temp;
        if(temp>0){
            pos++;
        }
         if(temp<0){
            neg++;
        }
        numbers.push_back(temp);
    }
    if((pos>=num/2+1&&!is_even) || (pos>=num/2&&is_even)){
        cout<<3<<endl;
    }
   else if((neg>=num/2+1&&!is_even) || (neg>=num/2&&is_even)){
        cout<<-3<<endl;
    }
   else {
        cout<<0<<endl;
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main(){
	int n;
	cin>>n;
	int a[n];
	int zc=0,nc=0;
	for(int i=0; i<n; i++){
		cin>>a[i];
		if(a[i] < 0)
			nc++;
		else if(a[i] == 0)
			zc++;
	}
	//cout<<nc<<endl<<zc<<endl;
	if(nc >= ceil(n/2.0))
		cout<<-1<<endl;
	else if(zc > (n-zc))
		cout<<0<<endl;
	else{
		if(nc > ceil(n/2.0))
			cout<<-1<<endl;
		else if((nc+zc) > abs(n-nc-zc))
			cout<<0<<endl;
		else
			cout<<1<<endl;
	}
	return 0;
}

#include <bits/stdc++.h>
#define REP(i, n) for (long long i = 0; i < n; i++)
using namespace std;
typedef long long Long;

const Long N = 101;

Long A[N];

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.precision(10);
	cout << fixed;

    Long n;
    cin >> n;
    Long pos = 0;
    Long neg = 0;
    for(Long i = 0; i < n; i++){
    	cin >> A[i];
    	if(A[i] > 0){
    		pos++;
		}
		if(A[i] < 0){
			neg++;
		}
	}
	Long lim = n/2;
	if(n%2 == 1){
		lim++;
	}
	if(pos >= lim){
		cout << 1 << endl;
		return 0;
	}
	if(neg >= lim){
		cout << -1 << endl;
		return 0;
	}
	cout << 0 << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define f(i,a,b) for(ll i=a;i<b;i++)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define mod 1000000007
#define ii pair<ll,ll>
#define vii vector<ii>
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define MAX 100

ll modpow(ll base, ll exp, ll modulus) {base %= modulus;ll result = 1;while (exp > 0) {if (exp & 1) result = (result * base) % modulus;base = (base * base) % modulus;exp >>= 1;}return result;}
const ld pi=acos(-1);

int main(){
    IOS;
  ll n;cin>>n;ll a[n];ll cntn=0,cntp=0;
  f(i,0,n){cin>>a[i];if(a[i]<0)cntn++;if(a[i]>0)cntp++;}
  if(n%2){
  if(cntp>n/2)cout<<1;
  else if(cntn>n/2)cout<<-1;
  else cout<<0;
  }
  else{
  if(cntp>=n/2)cout<<1;
  else if(cntn>=n/2)cout<<-1;
  else cout<<0;
    }
  return 0;
}

#include <bits/stdc++.h>

using namespace std;

signed main(){
   ios_base::sync_with_stdio(false);
   cin.tie(nullptr);
   int n;
   cin>>n;
   int nb2 = n/2+ (n%2);
   int a[n];
   for (int i = 0; i < n; i++)
   {
       int t;
       cin>>t;
       a[i]=t;
   }
   int sign[3] = {0};
   for (int i = 0; i < n; i++)
   {

       if(a[i]==0)
        {sign[1]++;}
        else if(a[i]>0)
        {sign[2]++;}
        else if(a[i]<0)
        {sign[0]++;}

       /* code */
   }
   int re=0;
   if(sign[1]>nb2)
   {
       re = 0;
   }
   if(sign[0]>sign[2]&&sign[0]>=nb2)
   {
       re = -4;

   }
   if(sign[2]>=nb2)
   {
       re = 4;

   }
   cout<<re;

   return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int i,n,a=0,b=0;
    std::cin>>n;
    float q=n;
    float z=q/2;
    float y=ceil(z);
    int ar[n];
    for(i=1;i<=n;i++)
    {
        std::cin>>ar[i];
    }
    for(i=1;i<=n;i++)
    {
        if(ar[i]<0)
        {
            a++;
        }
        else if(ar[i]>0)
        {
            b++;
        }
        else
        {
            continue;
        }

    }

    if(b>=y)
    {
        std::cout<<"1\n";
    }
    else if(a>=y)
    {
       std::cout<<"-1\n";
    }
    else
        std::cout<<"0\n";

    return 0;
}

#include <bits/stdc++.h>
const int N=1e6+10;
typedef long double ll;
using namespace std;
ll ans;

int main(){
    int n; cin>>n;
    vector<long double>A(n),tmp(n);

    for(int i=0;i<n;++i) cin>>A[i];
    tmp=A;
    for(int i=-100;i<=1e3;++i){
    	if(i==0) continue;
        int cnt=0;
        A=tmp;
        //cout<<A[0]<<endl;
        for(int j=0;j<n;++j)
            A[j]/=i*1.0;

        for(int j=0;j<n;++j)
            if(A[j]>0) cnt++;

        if(cnt>=((ceil(n/(2*1.0))))){
            cout<<i;
            return 0;
        }
    }
    cout<<0;

}

#include<bits/stdc++.h>

using namespace std;

int main () {
	long long i,l,s,m,n,j,p;
	double x;

	cin >> n;

	long long a[n+1];
	m = 0;
	p = 0;
	for ( i=1; i<=n; i++) {
		cin >> a[i];
		if ( a [ i ] > 0 ) m ++;
		if ( a [ i ] < 0 ) p ++;
	}
	if ( m < ( n + 1 ) / 2 && p < ( n + 1 ) / 2 ) cout << "0\n";
		else if ( m >= ( n + 1 ) / 2 ) cout << "1\n";
			else cout << "-1\n";
}

// 1130A.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
	int n, * a;
	cin >> n;
	a = new int[n];
	int posetive = 0, negetive = 0;
	for(int i=0;i<n;i++)
	{
		cin >> a[i];
		if (a[i] > 0)
			posetive++;
		else if (a[i] < 0)
			negetive++;
	}
	if (n % 2 != 0) n = n / 2 + 1;
	else n = n / 2;
	if (negetive >= n )
		cout << "-1";
	else if (posetive >= n )
		cout << "1";
	else
		cout << 0;
	return 0;
}

#include <iostream>
using namespace std;
int main(){
    int n;
    cin>>n;
    int a[n];
    for(int i=0; i<n; ++i){
        cin>>a[i];
    }
    long counter=0;
    for(int j=-1000; j<=1000; ++j){
    for(int i=0; i<n; ++i){
            if(j!=0){
        if(a[i]*1.0/j*1.0>0){
            counter++;
        }
    }
    }
        if(counter>=n/2.0){
            cout<<j;
            return 0;
        }
        counter=0;
    }
    cout<<"0";
return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
using namespace std;

int main() {
	int n;
	scanf("%d", &n);
	int pos = 0, neg = 0, zero = 0, temp;
	for (int i = 0; i < n; i++) {
		scanf("%d", &temp);
		if (temp > 0) pos++;
		else if (temp < 0) neg++;
		else zero++;
	}
	if (pos >= zero + neg) printf("1");
	else if (neg >= zero + pos) printf("-1");
	else printf("0");
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,nonNegative=0,negative=0,zer0=0,count=0;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(arr[i]>0)
        {
            nonNegative++;
        }
        else if(arr[i]<0)
        {
            negative++;
        }
        else
        {
            zer0++;
        }
    }
    int x=0;
      if(n%2!=0)
    {
         x=(n/2)+1;
    }
    else
    {
        x=n/2;
    }

    int temp=0;
    if(nonNegative>negative)
    {
         temp=nonNegative;
    }
    else
    {
        temp=negative;
    }
    if(temp>=x)
    {
        if(nonNegative>negative)
        cout<<1;
        else
        cout<<-1;
    }
    else
    {
        cout<<0;
    }

}

#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n,pos=0,neg=0,i,k;
    cin >> n ;
    int arr[n+9];
    for(i=0;i<n;i++)
    {
        cin>> arr[i];
        if(arr[i] > 0) pos++;
        else if(arr[i]<0)neg++;
    }
    int mid=(n+1)/2;
    //cout << pos << " "<<neg <<" :=" <<mid <<endl;
    //if(pos+neg < mid) cout << "0"<<endl;
        if(pos >= mid) cout <<"1"<<endl;
        else if(neg >= mid) cout << "-1"<<endl;
        else cout << "0"<<endl;
    return 0;
}

#include <iostream>

using namespace std;

int main(void) {
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	int n; cin >> n;
	double arr[n] = {0, };
	for(int i = 0; i < n; i++)
		cin >> arr[i];

	int len;
	if(n%2 == 1)
		len = n/2+1;
	else
		len = n/2;

	int ponum = 0;
	int nenum = 0;

	for(int i = 0; i < n; i++) {
		if(arr[i] > 0)
			ponum++;
		if(arr[i] < 0)
			nenum++;
	}
	if(ponum >= len) {
		cout<<1;
	}
	else if(nenum >= len) {
		cout<<-1;
	}
	else
		cout<<0;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main(){
	int n;
	cin >> n;
	int a[n], pos=0, neg=0;
	for (int i=0; i<n; i++){
		cin >> a[i];
		if (a[i]>0) pos++;
		else if (a[i]<0) neg++;
	}
	if (max(pos, neg)<(n+1)/2) cout << "0\n";
	else if (pos>neg) cout << "1\n";
	else cout << "-1\n";
}

/*
 This C++ Source is
 writen by syksykCCC
 (2019)
*/

#include<cstdio>
#include<climits>
#include<cctype>
#include<cstring>
#include<cmath>
#include<string>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<vector>

#define QUICK_IOS ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define FILEIO(s) freopen((s)".in","r",stdin),freopen((s)".out","w",stdout)
#define DEBUG() freopen("in.txt","r",stdin)

#define REP(i,x,y) for(int i=x;i<=y;i++)
#define PER(i,x,y) for(int i=x;i>=y;i--)

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

template <typename T> inline void read(T &val)
{
	val = 0;
	int f = 1 ;
	char c = getchar();
	while (! isdigit(c))
	{
		if(c == '-') f = -1;
		c = getchar();
	}
	while (isdigit(c))
	{
		val = (val << 3) + (val << 1) + (c ^ 48);
		c = getchar();
	}
	val *= f;
}

const int N = 105;
int a[N], n, z, f;

int main()
{
	QUICK_IOS;
	cin >> n;
	REP(i, 1, n)
	{
		cin >> a[i];
		if (a[i] > 0) z ++;
		if (a[i] < 0) f ++;
	}
	if (z >= n + 1 >> 1)
		cout << 1 << endl;
	else if (f >= n + 1 >> 1)
		cout << -1 << endl;
	else
		cout << 0 << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
int n,po=0,ne=0,d;
cin>>n;
int arr[n];
for(int i=0;i<n;i++){
        cin>>arr[i];
        if(arr[i]>0)po++;
         if(arr[i]<0)ne++;
    }
    if(n%2==0)d=n/2;
    else d=n/2+1;
    if(ne>=d)cout<<-1<<endl;
    else if(po>=d)cout<<po<<endl;
    else cout<<0<<endl;
  }

#include <bits/stdc++.h>

using namespace std;

int main()
{
    float a,b,menos=0,maximo=0;
    cin >> a;
    for(int i=0;i<a;i++){
        cin >> b;
        if(b<0){
            menos--;
        }
        else if(b>0){
            maximo++;
        }
    }
    if(a/2<=abs(menos)){
        cout << menos;
    }
    else if(a/2<=maximo){
        cout << maximo;
    }
    else{cout << "0";}
}

#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define sz size()
#define sc second
#define fr first
#define r return
#define TIME ios_base::sync_with_stdio(0);
using namespace std;

    const ll N = 1e6+1;

ll n , m , k , l , cnt , ans , mx , mn, x , y ;
vector < ll > v , d;
pair < ll , ll > p [ N ];
string s , t ;
map < ll , ll > mp;
char ch;
ll a [ N ];

int main()
{
    TIME
    cin >> n ;
    for ( ll i = 1 ; i <= n ; i ++ )
    {
        cin >> l , v.pb ( l );
    }
    if ( n % 2 == 0 )
        x = n / 2;
    if ( n % 2 == 1 )
        x = ( n / 2 ) + 1;
    for ( ll i = 0 ; i < n ; i ++ ){
        if (  v[ i ] > 0 )
            cnt ++;
        if ( v [ i ] < 0 )
            ans ++;
    }
    if ( cnt >= ans )
    {
        if ( cnt >= x )
            cout << 1;
        else
            cout << 0;
        r 0;
    }
    else if ( ans > cnt )
    {
        if ( ans >= x )
            cout << -1;
        else
            cout << 0;
        r 0;
    }
    else
        cout << 0;
}

#include<iostream>
#include<math.h>
int main()
{
	int n;
	std::cin >> n;
	int pos = 0, neg = 0;
	for (int i = 0; i < n; i++)
	{
		int x;
		std::cin >> x;
		if (x > 0)
			pos++;
		else if (x < 0)
			neg++;
	}

	if (pos >= ceil(n / 2.0))
		std::cout << 1;
	else if (neg >= ceil(n / 2.0))
		std::cout << -1;
	else
		std::cout << 0;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    float n,countp=0,countn=0;
    cin>>n;
    for(int i=0;i<n;i++)
    {
        long long int t;
        cin>>t;
        if(t>0)
        {
            countp++;
        }
        else if(t<0)
        {
            countn++;
        }
    }
    int t=ceil(n/2);
    if(countp>=t)
    {
        cout<<"1\n";
    }
    else if(countn>=t)
    {
        cout<<"-1\n";
    }
    else
    {
        cout<<"0\n";
    }
}

#include <bits/stdc++.h>
#define ll long long
using namespace std;
int n,m;
int pre[1005];

int main()
{
  cin>>n;
  int m = ceil(1.0 * n / 2);
  int ans = 0, ans1 = 0;
  for(int i=0;i<n;i++){
    cin>>pre[i];
    if(pre[i] > 0){
      ans ++;
    }
    if(pre[i] < 0){
      ans1 ++;
    }
  }
  if(ans >= m)puts("1");
  else if(ans1 >= m) puts("-1");
  else
  puts("0");
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
int  main()
{
    int m,p=0,n=0;
    cin>>m;
    int a[m];
    for(int i=0;i<m;i++)
    {
        cin>>a[i];
        if(a[i]>0)
            {p++;}
        if(a[i]<0)
            {n++;}
    }
if(p>=((m+1)/2))
{   cout<<1;
    return 0;
}
if(n>=((m+1)/2))
{
    cout<<-1;
    return 0;
}
else
{
    cout<<0;
}
}

#include<iostream>
using namespace std;

int main() {
	int n, num;
	cin >> n;
	int a = 0, b = 0, c = 0,m = n / 2;
	m = m * 2 == n ? m : m + 1;
	for(int i = 0; i < n; i++) {
		cin >> num;
		if(num > 0) a++;
		else if(num < 0) b++;
		else c++;
	}
	if(a >= m) cout << 1;
	else if(b >= m) cout << -1;
	else cout << 0;
	return 0;
}

#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define ull unsigned long long int
#define st string
#define pi  2 *acos(0.0)
#define vt vector
using namespace std;
int main()
{
    ll n;
    cin>>n;
    ll k=(n+1)/2;
    ll j=k+1;
    ll a[n],c=0,c1=0,c2=0;
    for(ll i=0;i<n;i++)
        {
            cin>>a[i];
            if(a[i]>0)
            {
                c1++;
            }
           else if(a[i]<0)
            {
                c2++;
            }
        }
        if(c1>=k) cout<<2;
        else if(c2>=k)cout<<-2;
        else cout<<0;
}

#include<iostream>
#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int main()
{
    ll n,ch;cin>>n;ll pos=0,neg=0;float div;
    ch=n/2;
    if(n&1)ch++;
    float a[n];for(ll i=0;i<n;i++){
        cin>>a[i];
        if(a[i]>=1)
            pos++;
        else if(a[i]<0)
            neg++;
    }
    if(pos>=neg){
        if(pos>=ch){
            cout<<1<<endl;
        }else{
        cout<<0<<endl;}
    }else{
    if(neg>=ch){
        cout<<-1<<endl;
    }else{
      cout<<0<<endl;   }
    }
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main() {
	int N;
	cin >> N;
	int pos = 0, neg = 0, neu = 0;
	for (int i = 0; i < N; i++) {
		int num;
		cin >> num;
		if ( num > 0 )	pos++;
		else if ( num < 0 ) neg++;
		else	neu++;
	}
	//cout << pos << " " << neg << " " << neu << endl;
	if ( pos >= neg && pos >= neu && pos >= N/2 + N%2 )		cout << 1;
	else if ( neg >= pos && neg >= neu && neg >= N/2 +N%2 )    cout << -1;
	else	cout << 0;
	//cout << ( pos >= neg && pos >= neu ) ? 1 : ( ( neg >= pos && neg >= neu ) ? -1 : 0 ) ;
	return 0;
}

#include <iostream>
using namespace std;
int main ()
{
    int p=0,n=0;
    int m;
    cin>>m;
    int arr[m];
    int var;
    if (m%2==0) var=m/2;
    else var=(m/2)+1;
    for (int i=0;i<m;i++)
    {
        cin>>arr[i];
        if (arr[i]>0) p++;
        else if (arr[i]<0) n++;
     }
     if (p>=var) cout << 1 << endl;
     else if (n>=var) cout << -1 << endl;
     else cout << 0 << endl;
     return 0;
}

#include <iostream>
using namespace std;
int main()
{
    int m;
    cin>>m;
    int p=0,n=0,z=0;
    for(int i=0; i<m; i++)
    {
        int x;
        cin>>x;
        if(x<0)
            ++n;
        if(x>0)
            ++p;
        if(x==0)
            ++z;
    }
    if(n==p&&n==z)
    {
        cout<<0;
        return 0;
    }
    if(n>p)
    {
        int h=n;
        n=p;
        p=h;
        if(z>p||z+n>p)
            cout<<0;
        else
            cout<<-1;
        return 0;
    }
    if(p>=n)
    {

        if(z>p||z+n>p)
            cout<<0;
        else
            cout<<1;
        return 0;
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair<ll,ll>
#define vpll vector <pll>
#define pb push_back

int main()
{
    int n,a,p=0,q=0;
    cin>>n;
    int m=n;
    while(m--)
    {
        cin>>a;
        if(a>0)
            p++;
        if(a<0)
            q++;
    }
    if(p*2>=n)
        cout<<"1";
    else if(q*2>=n)
        cout<<"-1";
    else
        cout<<"0";
    return 0;
}

#include<iostream>
#include <vector>
using namespace std;

int main(void)
{
	int n; cin >> n;
	int x = 0, y = 0;
	int z = 0;
	int cmp = n / 2;
	if (n & 1) cmp++;
	for (int i = 0; i < n; i++) {
		int tmp; cin >> tmp;
		if (tmp == 0)z++;
		if (tmp > 0)x++;
		else if (tmp < 0) y++;
	}
	if (x >= cmp) {
		cout << 1 << '\n';
	}
	else if (y >= cmp) {
		cout << -1 << '\n';
	}
	else{
		cout << 0 << '\n';
	}

}

/*
 * socode.online
 *
 * Author: 李策
 * E-mail: 691397536@qq.com
 * Time  : 2020-02-10 18:43:40
 */
#include <bits/stdc++.h>

using namespace std;

#define mem(a,b) memset(a,b,sizeof(a))

typedef long long ll;

int a[105];

int main() {
	int n;
	scanf("%d",&n);
	int cnt1 = 0, cnt2 = 0;
	for( int i = 1; i <= n ; i++ ) {
		scanf("%d",&a[i]);
		if( a[i] > 0 ) cnt1++;
		else if( a[i] < 0 ) cnt2++;
	}
	int need = n / 2;
	if( n % 2 ) need++;
	if( cnt1 < need && cnt2 < need ) printf("0\n");
	else if( cnt1 >= need ) printf("1\n");
	else printf("-1\n");
	return 0;
}

 #include<bits/stdc++.h>
 using namespace std;
 main(){
  int arr[100000],n,i,j,c=0,m=0,q=0;
  cin>>n;
  for (i=0;i<n;i++){
    cin>>arr[i];
    if (arr[i]>0){
        j=arr[i];
        c++;
    }
    else if(arr[i]<0){
        m++;
        q=arr[i];
    }
  }
  if(n%2==0){
    n=n/2;
  }
  else{
    n=(n/2)+1;
  }

 if (m>=n){
   cout<<q;
 }
 else if (c>=n){
    cout<<j;
 }
 else{
    cout<<0;
 }
 }

 #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FuckTheOutputFast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define vbe v.begin(),v.end()
#define mx *max_element
#define mi *min_element
#define itep vector < pair < long long , long long > > :: iterator it;
#define ite vector < long long > :: iterator it;
#define fn for(long long int i =0 ;i <n;i++)
#define fn1 for(long long int i =1;i<=n;i++)
#define fm for(long long int j =0 ;j <m;j++)
#define fm1 for(long long int j =1;j<=m;j++)
#define fi first
#define se second
#define MOD 1000000007
const int N = 1 << 20;
long double ar[N];
int main(){
	FuckTheOutputFast;
	ll n ;
	cin >> n;
	ll neg=0,pos=0,zeros=0;
	fn{
	    ll x;
	    cin >> x;
	    if(x<0)neg++;
	    else if(x>0)pos++;
	    else
	    zeros++;
	}
	ll x  =  n/2 + n%2;
	if(pos>=x){
	    return cout <<1,0;
	}
	else if(neg>=x){
	    return cout <<"-1",0;
	}
	cout <<0;
	return 0;
}

/*
 * socode.online
 *
 * Author: 刘兆宇
 * E-mail: 781050469@qq.com
 * Time  : 2020-02-10 18:31:50
 */
#include<bits/stdc++.h>

using namespace std;

int a[105];
int main() {
  int n;
  cin >> n;
  //int ok = n;
  int pos = 0,nag = 0;
  for(int i=1;i<=n;i++) {
    cin >> a[i];
    if(a[i] > 0) pos ++;
    else if(a[i] < 0) nag ++;
    //else ok--;
  }
  int mid = ceil(n*1.0/2);
  //cout << mid << endl;
  if(pos >= nag && pos >= mid) cout << "1" << endl;
  else if(nag >= pos && nag >= mid) cout << "-1" << endl;
  else cout << "0" << endl;
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int arr[n];
    int ps=0,ng=0,zro=0;
    for(int i=0;i<n;i++)
    {

        cin>>arr[i];
        if(arr[i]>0)
            ps++;
       if(arr[i]<0)
            ng++;

    }
    if(2*ps>=n)
    {

        cout<<"1";
        return 0;
    }
    if(2*ng>=n)
    {
        cout<<"-1";
        return 0;
    }
    cout<<"0";
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int n,nrneg=0,nr=0,x;
    cin >> n;
    for(int i=1;i<=n;i++) {
        cin >> x;
        if(x>0)
        {
            nr++;
        }
        else if(x<0) {
            nrneg++;
        }
    }
    if(nr>=n/2+n%2) {
        cout << 1;
    }
    else if(nrneg>=n/2+n%2) {
        cout << -1;
    }
    else cout << 0;
}

/*
 * socode.online
 *
 * Author: 钟逸轩
 * E-mail: 3245781919@qq.com
 * Time  : 2020-03-29 18:38:43
 */
#include<bits/stdc++.h>
using namespace std;
const long long INF=0;
int main(){
    int n,m,z=0,f=0;
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>m;
        if(m>0){
        	z++;
        }
        if(m<0){
        	f++;
        }
    }
    if(2*z>=n){
    	cout<<1<<endl;
	}else if(2*f>=n){
    	cout<<-1<<endl;
    }else{
    	cout<<0<<endl;
    }
    return 0;
}

#include<bits/stdc++.h>
#include<string>
#include<math.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef string str;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<str> vs;
typedef map<long long,long long> mll;
typedef map<int,int> mii;
typedef map<string,int> msi;
typedef map<char,int> mci;
typedef pair<int,int> pii;
typedef pair<long long,long long> pll;

#define big 100000007
#define PI  3.1415926535897932384626433832795l
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define sp(n)    cout<<fixed<<setprecision(n);
#define FOR(i,a,b)   for (ll i=a;i<=b;i++)
#define FOR_R(i,a,b)   for(ll i=a;i>=b;i--)

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int n;
	cin>>n;
	double a[n];
	int count0=0;
	int count1=0;
	int count2=0;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		if(a[i]==0)
		{
			count0++;
		}
		if(a[i]>0)
		{
			count1++;
		}
		if(a[i]<0)
		{
			count2++;
		}
	}
	int k=n/2;
	if(n%2!=0)
	{
		k++;
	}
	//cout<<count0<<" "<<count1<<" "<<count2<<"@@@"<<endl;
	if(count1>=k)
	{
		cout<<"1";
		return 0;
	}
	if(count2>=k)
	{
		cout<<"-1";
		return 0;
	}
	/*if(count0>=k)
	{
		cout<<"0";
	}*/
	cout<<"0";
	return 0;
}

#include <iostream>

using namespace std;

int a[1007];
long long n,t,nr0,nrneg,i,nrpoz;

int main()
{
    cin >> n;
    for (i=1;i<=n;i++){
        cin >> a[i];
    }
    t=(n+1)/2;
    for (i=1;i<=n;i++){
        if (a[i]<0)
            nrneg=nrneg+1;
        else if (a[i]==0)
            nr0=nr0+1;
        else{
            nrpoz=nrpoz+1;
        }
    }
    if (nrpoz>=t && nrneg<t)
        cout << 1;
    else if (nrpoz>=t && nrneg>=t)
        cout << 1;
    else if (nrneg>=t && nrpoz<t)
        cout << -1;
    else if (nrneg<t && nrpoz<t)
        cout << 0;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n, zCount = 0, nCount = 0, pCount = 0;
    cin >> n;
    vector<int> v(n);

    for (int i = 0; i < n; i++)
        cin >> v[i];

    for (int i = 0; i < n; i++)
    {
        if (v[i] == 0)
            zCount++;
        if (v[i] < 0)
            nCount++;
        if (v[i] > 0)
            pCount++;
    }

    if (pCount >= (n+1)/2)
    	cout << 1;
    else if (nCount >= (n+1)/2)
    	cout << -1;
    else
    	cout << 0;

    return 0;
}

#include <iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<unordered_map>
#include<math.h>
using namespace std;

int main(){
	int n;
	cin>>n;
	int z=0,p=0,ng=0;
	for(int i=0;i<n;i++){
		int x;
		cin>>x;
		if(x==0) z++;
		else if(x<0) ng++;
		else p++;
	}
	int xx;
	if(n%2) xx=n/2+1;
	else xx=n/2;

	 if(p>=xx) cout<<1;
	 else if(ng>=xx) cout<<-1;
	else cout<<0;

return 0;
}

#include<bits/stdc++.h>
using namespace std;
int n,ans1=0,ans2=0;
bool sx1,sx2;
int Array[110];
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>Array[i];
	}
	for(int i=1;i<=n;i++){
		if(Array[i]>0) ans1++;
		if(Array[i]<0) ans2++;
	}
	if((ans1<(n/2.0))&&(ans2<(n/2.0))){
		cout<<0;
		return 0;
	}
	if(ans1>=ans2) cout<<1;
	if(ans1<ans2) cout<<-1;
	return 0;
}

/*
 * socode.online
 *
 * Author: 小螺号
 * E-mail: 598601767@qq.com
 * Time  : 2020-02-10 18:35:18
 */
#include <bits/stdc++.h>
using namespace std;

int a[105];
int ans1=0,ans2=0,ans3=0;

int main(){
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		if(a[i]>0){
			ans1++;
		}
		else if(a[i]<0){
			ans2++;
		}
		else{
			ans3++;
		}
	}
	int b;
	if(n%2==0){
	  b=n/2;
	}
	else{
	  b=n/2+1;
	}
	if(ans1>=b&&ans1>=1){
		printf("1\n");
	}
	else if(ans2>=b&&ans1<ans2){
		printf("-1\n");
	}
	else{
		printf("0\n");
	}
	return 0;
}

#include <iostream>
#include <array>
#include <vector>
#include <tuple>
#include <unordered_map>
#include <cmath>
#include <tuple>
#include <map>
#include <set>
#include <string>
#include <cmath>
using namespace std;

int main()
{
	int n;
	cin >> n;

	int numPositive = 0;
	int numNegative = 0;
	for (int i = 0; i < n; ++i) {
		int a;
		cin >> a;
		if (a > 0) ++numPositive;
		if (a < 0) ++numNegative;
	}

	int numElementsWeWant = (int)ceil(n / 2.0);
	if (numPositive >= numElementsWeWant) {
		cout << 1 << endl;
	}
	else if (numNegative >= numElementsWeWant) {
		cout << -1 << endl;
	}
	else
	{
		cout << 0 << endl;
	}
}

#include <stdio.h>
#include <algorithm>

using namespace std;

int N, cnt, input[3];//+,-,0
int main() {
	scanf("%d", &N);
	for (int i = 0,a; i < N; i++) {
		scanf("%d", &a);
		if (a > 0)input[0]++;
		else if (a < 0) input[1]++;
		else input[2]++;
	}
	cnt = N / 2;
	if (N % 2) cnt++;
	if (input[0] >= cnt) printf("1");
	else if (input[1] >= cnt) printf("-1");
	else printf("0");
	return 0;
}

#include <iostream>
using namespace std;

int main()
{
	int n, a, zero = 0, great = 0, less = 0;
	cin >> n;

	for (size_t i = 0; i < n; i++)
	{
		cin >> a;
		if (a == 0)
		{
			zero++;
		}
		else if (a > 0)
		{
			great++;
		}
		else
		{
			less++;
		}
	}

	a = (n + 1) / 2;

	if (great >= a)
	{
		cout << 1 << endl;
	}
	else if (less >= a)
	{
		cout << "-1" << endl;
	}
	else
	{
		cout << 0 << endl;
	}

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int a[n];
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	int p=0;
	int n1=0;
	for(int i=0;i<n;i++)
	{
		if(a[i]>0)
		{
			p++;
		}
		else if(a[i]<0)
		{
			n1++;
		}
	}
	if(p>=((n+1)/2))
	{
		cout<<"1"<<endl;
	}
	else if(n1>=((n+1)/2))
	{
		cout<<"-1"<<endl;
	}
	else
	{
		cout<<"0"<<endl;
	}
}

#include <bits/stdc++.h>
#include<iostream>
#include<string.h>
#include<stdlib.h>
#include <string>
#include<stdio.h>
#include<math.h>
#define cube(x) (x*x*x)
#define sqr(x) (x*x)
#define pi acos(-1)
//-------------------------------------//
typedef unsigned long long ull;
typedef long long int lld;
typedef long double ld;
using namespace std;
//------------------------------------//
int f, i, j, k;
//-----------------------------------//
int main()
{
    int n, c=0, d=0, e=0;
    cin >>n;
    int a;
    for(i=0; i<n; i++)
    {
        cin >>a;
        if(a==0)
        {
            c++;
        }
        else if(a>0)
        {
            d++;
        }
        else
        {
            e++;
        }
    }
    k=(n-1)/2+1;

    if(d>=k)
    {
        cout <<"1" <<endl;
    }
    else if(e>=k)
    {
        cout <<"-1" <<endl;
    }
    else
    {
        cout <<"0" <<endl;
    }

    return 0;
}

#include<cstdio>
#include<vector>

using namespace std;

int main()
{
	int n;
	int pos = 0, neg = 0;
	int input;
	int i;

	scanf("%d", &n);

	for (i = 0; i < n; i++)
	{
		scanf("%d", &input);

		pos += (input > 0);
		neg += (input < 0);
	}

	if (pos >= n / 2 + n % 2)
	{
		printf("1\n");
	}

	else if (neg >= n / 2 + n % 2)
	{
		printf("-1\n");
	}

	else
	{
		printf("0\n");
	}

	return 0;
}

#include<bits/stdc++.h>
#include<string>
#include<math.h>
using namespace std;
int main()
{
    int a[10000];
    int n,k,i,l=0;

    cin>>n;
    for(i=0; i<n; i++)
    {
        cin>>a[i];
        //l+=a[i];
    }
    k=0;
    int j=0;
    for(i=0; i<n; i++)
    {
        if(a[i]<0)
        {
            k++;
        }
        if(a[i]>0)
        {
            l++;
        }
    }
    if(l*2>=n)
        cout<<"1"<<endl;
    else if(k*2>=n)
        cout<<"-1"<<endl;
    else
        cout<<"0"<<endl;
    return 0;
}

#include <iostream>
#include <vector>
#include <stdlib.h>
#include <map>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <string>
#include <string.h>
#include <cmath>
#include <time.h>
using namespace std;
int a[104];
int n;

#define ABS(a) ((a) < 0 ? (-(a)):(a))

int main()
{
	ios::sync_with_stdio(false), cout.tie(NULL), cin.tie(NULL);

	int d;
	int n;
	int a[104];
	double b[104];
	cin >> n;
	int i;
	int cntP = 0;
	int cntN = 0;
	for (i = 0; i < n; i++)
	{
		cin >> a[i];
		if (a[i] > 0)
			cntP++;
		if (a[i] < 0)
			cntN++;
	}

	if (cntP >= n / 2 + n % 2)
		cout << 1 << endl;
	else if (cntN >= n / 2 + n % 2)
		cout << -1 << endl;
	else
		cout << 0 << endl;
	return 0;
}

#include<cstdio>
int d,a[105],n,l,cnt;
int main()
{
    scanf("%d",&n);l=(n+1)/2;
    for(int i=1;i<=n;i++) scanf("%d",a+i);
    for(d=-1000;d<=1000;d++){
        if(!d) continue;
        cnt=0;
        for(int i=1;i<=n;i++) if(a[i]&&(double)a[i]/d>0) cnt++;
        if(cnt>=l) {printf("%d",d);return 0;}
    }
    printf("0");return 0;
}

// no proof is included - massive homework mode

#include <iostream> // std::cin, std::cout

using namespace std;

int main(){
    int n;
    cin >> n;

    int pos = 0, neg = 0,
        a;
    for (int i = 0; i < n; i++) {
        cin >> a;

        if (a < 0) {
            neg ++;
        } else if (a > 0) {
            pos ++;
        }
    }

    if (pos >= (n + 1) / 2) { // thanks shayan. I remember, he taught us ceil(n / 2) on the first day we had at high school (disincluding the exams, etc), which some of us in panj-hafte also created our codeforces account on that day.
        cout << 1 << endl;
    } else if (neg >= (n + 1) / 2){
        cout << -1 << endl;
    } else {
        cout << 0 << endl;
    }

    return 0;
}

#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string.h>
using namespace std;
#define lli long long int
const int INF = 987654321;
const int MODV = 1e9 + 7;

int main()
{
	int n;
	int pos, neg;
	pos = neg = 0;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		int x; scanf("%d", &x);
		if (x > 0) pos++;
		if (x < 0) neg++;
	}
	if (pos >= (n + 1) / 2) printf("1\n");
	else if (neg >= (n + 1) / 2) printf("-1\n");
	else printf("0\n");
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, x; cin >> n;
  int pc = 0, zc = 0, nc = 0;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x < 0) nc++;
    else if (x > 0) pc++;
    else zc++;
  }
  int req = (n%2 == 0) ? n/2 : (n/2 + 1);
  if (req <= pc) cout << 1;
  else if (req > pc) {
    if (nc >= req) cout << -1;
    else cout << 0;
  }
  return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <math.h>
#include <map>
#include <set>
#include <stack>
#include <vector>
#include <time.h>
#include <random>
#include <algorithm>
#include <string>
#include <string.h>
#include <queue>
#include <deque>
#include <functional>
#include <cctype>
#include <list>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#define forn(start, finish, step) for (int step = start; step < finish; step++)
#define ff first
#define ss second
using namespace std;
typedef long long ll;

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#endif
	int n, a[110];
	cin >> n;
	int c0 = 0, p = 0, o = 0;
	forn(0, n, i) {
		cin >> a[i];
		if (a[i] == 0)
			c0++;
		if (a[i] < 0)
			o++;
		if (a[i] > 0)
			p++;
	}
	if (o >= ceil(n / 2.0))
		cout << -1000;
	else if (p >= ceil(n / 2.0))
		cout << 1000;
	else
		cout << 0;
}

#include <bits/stdc++.h>
using namespace std;

#define inputArray(arr,n) for(int ia = 0; ia<n; ia++) cin>>arr[ia]
#define printArray(arr,n) for(int ia = 0; ia<n; ia++) cout<<arr[ia]<<" "
#define lli long long int

int main(){
	int n;
	cin>>n;
	int arr[n];
	inputArray(arr,n);
	int desired = ceil((double)n/2);
	int pCount = 0,nCount = 0;
	for(int i=0; i<n; i++){
		if(arr[i]>0)
			pCount++;
		else if(arr[i]<0)
			nCount++;
	}
	// cout<<desired<<endl;
	if(pCount>=desired)
		cout<<1;
	else if(nCount>=desired)
		cout<<-1;
	else
		cout<<0;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;

	int pos = 0;
	int otr = 0;
	for (int i = 0; i < n; i++)
	{
		int tmp;
		cin >> tmp;
		if (tmp > 0) pos++;
		else if (tmp < 0) otr++;
	}

	int need = 0;
	if (n % 2 == 0)
		need = n / 2;
	else
		need = (n + 1) / 2;

	if (pos >= need)
		cout << "1";
	else if (otr >= need)
		cout << "-1";
	else
		cout << "0";
}

#include <bits/stdc++.h>
using namespace std;
#define IO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)

int main()
{
    IO;
    int n, pos = 0, neg = 0;
    cin >> n;
    for(int i = 0; i < n; i++)
    {
        int x;
        cin >> x;
        if(x > 0)
            pos++;
        else if(x < 0)
            neg++;
    }
    if(pos >= (n + 1) / 2)
        cout << 1;
    else if(neg >= (n + 1) / 2)
        cout << -1;
    else
        cout << 0;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int n;
	cin >> n;
	int arr[n];
	int ar=0,ek=0,si=0;
	for(int i=0; i<n; i++){
		cin >> arr[i];
		if(arr[i]>0)
			ar++;
		if(arr[i]<0)
			ek++;
	}
	int yari;
	if(n&1){
		yari=(n/2)+1;
	}
	if(!(n&1)){
		yari=(n/2);
	}
	if(ar>=yari){
		cout << 1;
		return 0;
	}
	else if(ek>=yari){
		cout << -1;
		return 0;
	}
	else
		cout << 0;

}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    float a[100],n;
    int i;
    cin>>n;
    int num=0,cnt=0,c=0;
    for(i=1;i<=n;i++)
    {
        cin>>a[i];
        if(a[i]<0)
        {
            num++;
        }
        if(a[i]!=0)
        {
            cnt++;
        }
        if(a[i]>0)
        {
            c++;
        }
    }
    if(num>=(n/2))
    {
        cout<<(-1)*num<<endl;
    }
    else if(c>=(n/2))
    {
        cout<<cnt<<endl;
    }
    else{
        cout<<"0"<<endl;
    }
    return 0;

}

#include <bits/stdc++.h>

using namespace std;

int n, x, y, q;

int main(){
    cin >> n;
    q = n / 2;
    int a[n];
    for(int i = 0; i < n; i++) {
        cin >> a[i];
    }
    for(int j = 0; j < n; j++) {
        if((a[j] / 1) > 0) {
            x++;
        }
        else if((a[j] / (-1)) > 0) {
            y++;
        }
    }
    if(n % 2 != 0) {
        if(x >= (q + 1)) {
            cout << 1;
        }
        else if(y >= (q + 1)) {
            cout << -1;
        }
        else {
            cout << 0;
        }
    }
    else {
        if(x >= q) {
            cout << 1;
        }
        else if(y >= q) {
            cout << -1;
        }
        else {
            cout << 0;
        }
    }
}

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a;
    cin>>a;
    int b[a];
    int z=0;
    int k=0;
    int v=0;
    for(int i=0;i<a;i++){
        cin>>b[i];
        if(b[i]<0)
        z++;
        else if(b[i]>0)
        k++;
        else
        v++;

    }

if(z>=ceil(a/2.0))
cout<<-1;
else if(k>=ceil(a/2.0))
cout<<1;
else
cout<<0;

}

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n,x;
	cin>>n;
	int p=0,neg=0;
	for(int i=0;i<n;i++)
	{
		cin>>x;
		if(x>0)
		p++;
		if(x<0)
		neg++;
	}
	int y=(n+1)/2;
	if(p>=y)
	cout<<1;
	else if(neg>=y)
	cout<<-1;
	else
	cout<<0;
	return 0;
}

#include <bits/stdc++.h>

#define int long long
#define FOR(i,a,b,s) for(int i=(a);(s)>0?(i<=(b)):(i>=(b));i+=s)
#define For(i,a,b) for(int i=(a);i<=(b);i++)
#define debug(x) do { cerr << #x << ": " << (x) << endl; } while(0)
#define debugv(x) do{cerr<<#x<<": ";for(auto e:vai(x))cerr<<e<<" ";cerr<<endl;}while(0)
#define range(a,b) (slice((a),(b)-(a),1))
#define iter(x) begin(x),end(x)
#define f1(a,e) [](int& a){return (e);}
#define f2(a,b,e) [](int& a,int& b){return (e);}
#define f3(a,b,c,e) [p](int& a,int& b, int& c){return (e);}
#define f2p(a,b,p,e) [p](int& a,int& b){return (e);}

using namespace std;                                                                                using vai=valarray<int>; using sai=slice_array<int>; using vec=valarray<int>;struct mat { int r, c; vai d; mat(int r, int c): r(r),c(c),d(r*c){}; int&operator()(int rr,int cc){return d[rr*c+c];} sai row_(int rr) { return d[slice(rr*c,c,1)];} vai row(int rr) const { return d[slice(rr*c,c,1)];} sai col_(int cc) { return d[slice(cc,r,c)];} vai col(int cc) const { return d[slice(cc,r,c)];} void pp(){For(i,0,r-1){For(j,0,c-1) cout<<setw(3)<<d[i*c+j]<< " ";cout<<endl;}} };

signed main(){
  ios::sync_with_stdio(false);cin.tie(nullptr);

  int n;
  cin >> n;
  vec a(n);

  For(i, 0, n-1) cin >> a[i];

  int cp = count_if(iter(a), f1(x, x>0) );
  int cn = count_if(iter(a), f1(x, x<0) );

  debugv(a);
  debug(cp);

  int half = (n+1)/2;

  int ans = 0;

  if (cp >= half) ans = 1;
  if (cn >= half) ans = -1;

  cout << ans << endl;

}

#include <stdio.h>

int main(void)
{
	int a[200];
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
		scanf("%d", &a[i]);
	int k,l;
	if (n % 2 == 1)
		l = k = n / 2 + 1;
	else
		l= k = n / 2;
	for (int i = 0; i < n; i++)
	{
		if (a[i]>0)
			k--;
		if (a[i] < 0)
			l--;
	}
	if (k <= 0)
		printf("4");
	else if (l <= 0)
		printf("-1");
	else
		printf("0");
}

                                                                                #define For(i,a,b) for(int i=(a);i<=(b);i++)
                                                                                #define debug(x) do { cerr << #x << ": " << (x) << endl; } while(0)
                                                                                #define range(a,b) (slice((a),(b)-(a),1))
                                                                                #define debugv(x) do{cerr<<#x<<": ";for(auto e:vai(x))cerr<<e<<" ";cerr<<endl;}while(0)
#include <bits/stdc++.h>
                                                                                #define int long long
                                                                                #define iter(x) begin(x),end(x)
                                                                                #define f1(e) [](int a){return (e);}
using namespace std;                                                                                using vai=valarray<int>; using sai=slice_array<int>; using vec=valarray<int>;struct mat { int r, c; vai d; mat(int r, int c): r(r),c(c),d(r*c){}; int&operator()(int rr,int cc){return d[rr*c+c];} sai row_(int rr) { return d[slice(rr*c,c,1)];} vai row(int rr) const { return d[slice(rr*c,c,1)];} sai col_(int cc) { return d[slice(cc,r,c)];} vai col(int cc) const { return d[slice(cc,r,c)];} void pp(){For(i,0,r-1){For(j,0,c-1) cout<<setw(3)<<d[i*c+j]<< " ";cout<<endl;}} };
                                                                                #define f2(e) [](int a,int b){return (e);}
                                                                                #define f3(e) [p](int a,int b, int c){return (e);}
                                                                                #define f1p(p,e) [p](int& _a){return (e);}
                                                                                #define f2p(p,e) [p](int& _a,int& _b){return (e);}
signed main(){
  ios::sync_with_stdio(false);cin.tie(nullptr);

  int n;
  cin >> n;
  vec a(n);

  For(i, 0, n-1) cin >> a[i];

  string s= "hello world";

  debug (count_if(iter(s), f1(a=='l') ) );

  int cp = count_if(iter(a), f1(a>0) );
  int cn = count_if(iter(a), f1(a<0) );

  debugv(a);
  debug(cp);

  int half = (n+1)/2;

  int ans = 0;

  if (cp >= half) ans = 1;
  if (cn >= half) ans = -1;

  cout << ans << endl;

}

#include <bits/stdc++.h>
#define MAX (ll)(1e7 + 7)
#define INF (ll)(1e18)
#define MOD (ll)(998244353)
using namespace std;
using ll = long long;
ll par[1000001],r[10000001];
int main()
{

long long t;

cin>>t;
double n=(double)t;
int cc=0,cc1=0;
long long a[t];
for(int i=0;i<t;i++)
{
    cin>>a[i];
}

for(int i=0;i<t;i++)
{
    if(a[i]>0)
        {++cc;
        continue;
    }

    if(a[i]<0)
       {++cc1;
       continue;}

}

if((ceil(n/2))<=cc1)
{
    cout<<-1<<endl;
    return 0;
}
if((ceil(n/2))<=cc)
{

    cout<<1<<endl;
    return 0;
}
else{
    cout<<0<<endl;
    return 0;
}

}

#include<cstdio>
#include<algorithm>
#include<iostream>
#include<cstring>
using namespace std;
#define inf 0x3f3f3f3f
#define maxn 50000+100
int main()
{
    int n,m,z=0,f=0;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>m;
        if(m>0)
            z++;
        if(m<0)
            f++;
    }
    int q=(n+1)/2;
    if(f>=q)
    cout<<-1<<endl;
    else if(z>=q)
    cout<<1<<endl;
    else
    cout<<0<<endl;
    return 0;
}

#include<cstdio>

int main(){
	int n;
	scanf("%d", &n);
	int size = (n + 1 ) >> 1;
	int pos = 0, neg = 0, num;
	for(int i = 0; i < n; i++){
		scanf("%d", &num);
		if(num > 0) pos++;
		if(num < 0) neg++;
	}

	if(pos >= size) printf("1\n");
	else if(neg >= size) printf("-1\n");
	else printf("0\n");
	return 0;
}

#include<iostream>
#include<string>
#include<cstring>
#include<vector>
#include<cmath>
#include<iomanip>
#include<map>
#include<queue>
#include<stack>
#include<algorithm>
#include <fstream>
#include <set>
#include <list>
using namespace std;
#define ll long long
#define ld long double
#define mp make_pair
#define all(g) g.begin(),g.end()
#define allr(g) g.rbegin(),g.rend()
#define re(x)   return cout<<x,0
#define in(n)for(int i=0;i<n;i++)cin>>v[i];
#define loop(n)for(int i=0;i<n;i++)
#define matar 	ios_base::sync_with_stdio(false); cin.tie(NULL);
#define me(x,v) memset(x,v,sizeof(x))
#define endl '\n'
ll GCD(ll a, ll b){ return(b == 0) ? a : GCD(b, a%b); }
ll LCM(ll a, ll b)
{
	ll temp = GCD(a, b);

	return temp ? (a / temp * b) : 0;
}
int dx[4] = { 1, -1, 0, 0 };
int dy[4] = { 0, 0, 1, -1 };
ll oo = 1e18;
ll const M = 1e6, N = 1e5 + 7;
ll  n, m, sum, t, c, k;
ll x, y;

int main()
{
	matar

		cin >> n;
	vector<int>v(n);
	in(n);
	loop(n)if (v[i] > 0)c++; else if (v[i] < 0)t++;
	if (c >= (n + 1) / 2){
		re(1);
	}
	else if (t >= (n + 1) / 2)re(-1);
	re(0);
	return 0;
}

#include <iostream>
using namespace std;
int main()
{
	int i, n, a, c0=0, cp=0, cm=0, k;
	cin >> n;
	for(i=0; i<n; i++)
	{
		cin >> a;
		if(a==0)
			c0++;
		if(a<0)
			cm++;
		if(a>0)
			cp++;
	}
	k=n/2;
	if(n%2>0)
		k++;
	if(cp>=k)
		cout << 1;
	else
		if(cm>=k)
			cout << -1;
		else
			cout << 0;
}

#include <bits/stdc++.h>

using namespace std;

double v[105];

int main()
{
    int n;
    cin >> n;
    for (int i = 1; i <= n; i ++) {
        cin >> v[i];
    }
    int nr = 0, N = n / 2;
    if (n % 2) N ++;
    for (int i = 2; i <= 100; i ++) {
        nr = 0;
        for (int j = 1; j <= n; j ++) {
            if (1.0 * (v[i] / i) > 0) nr ++;
        }
        if (nr >= N) {
            cout << i;
            return 0;
        }
    }
    cout << 0;
    return 0;
}

#include <bits/stdc++.h>

#define ll long long
#define ld long double
#define moeynaise main

using namespace std;

int moeynaise()
{
    ll n;
    ll po=0;
    ll ne=0;
    vector<ll>a;
    cin >>n;
    for(ll i=0;i<n;i++){
        ll x;cin >>x;
        if(x>0)
            po++;
        else if(x<0)
            ne++;
        a.push_back(x);
    }
    if(po>=n/2){
        cout << 1;
        return 0;
    }
    else if(ne>=n/2){
        cout << -1;
        return 0;
    }
    else
        cout << 0;
    return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int r=0;
	int l=0;
	int zero=0;
	int n;
	int a[200];
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		if(a[i]>0)
			r++;
		else if(a[i]<0)
			l++;
		else
			zero++;
	}
	double i=n/2;
	if(r>=i)
		cout<<1;
	else if(l>=i)
		cout<<-1;
	else
		cout<<0;
	return 0;
}

#include <bits/stdc++.h>
#define f(i,n) for(i=0;i<n;i++)
#define v vector<int>
using namespace std;

int main() {
    v arr;
	int n,i,count=0,count1=0,a;
	cin>>n;
	f(i,n){
	  cin>>a;
	  arr.push_back(a);
	}
	f(i,n){
	    if(arr[i]>0)
	    count++;
	    if(arr[i]<0)
	        count1++;
	}
	if(count>=3&&count>count1){
	    cout<<1<<endl;

	}
	if(count1>=3&&count1>count){
	    cout<<-1<<endl;
	}
	return 0;
}

#include <iostream>

using namespace std;

int main() {
int n;
cin >>n;
int a[n];
int k=0,q=0;
for(int i=0;i<n;i++){
    cin >>a[i];
    if(a[i]>>0){
        k++;
    }else if(a[i]<0){
      q++;
    }
}

//sort(a,a+n);
int p=(n+1)/2;
if(k>=p){
    cout <<2;
}
else if(q>=p){
    cout <<-2;
}
else {
cout <<0;
}
return 0;
}

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace std;
int a[10000];
int main()
{
    int n;scanf("%d",&n);int count_=0;
    for(int i=0;i<n;i++)
    {
        scanf("%d",&a[i]);if(a[i]>0)count_++;
    }
    if(count_>=(int)ceil(n*1.0/2))printf("2\n");
    else
            printf("0\n");
    return 0;
}

#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    vector<ll>vc;
    vector<double>div;
    double n;
    cin>>n;
    double cnt=0.0;
    double ok=0;
    ll count=0;
    double ans=ceil(n/2.0);
    for(int i=0;i<n;i++)
    {
        double num;
        cin>>num;
        if(num==0)
            cnt++;
    }
    double res=n-cnt;
    if(res<ans)
        cout<<0<<endl;
    else
        cout<<res<<endl;

   return 0;
}

#include<iostream>
#include<cstdio>
#include <cctype>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<string>
#include<cmath>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<map>
using namespace std;
#define ll long long
#define mem(a,x) memset(a,x,sizeof(a))
#define se second
#define fi first
const ll mod=998244353;
const int INF= 0x3f3f3f3f;
const int N=2e5+5;

int n;
int a[N];

int main()
{
    cin>>n;
    int num=(n+1)/2;
    for(int i=1;i<=n;i++) scanf("%d",&a[i]);
    sort(a+1,a+1+n);
    printf("%d\n",a[num]);
}

#include<bits/stdc++.h>
using namespace std;
long long t,i,n,c,z,j,n1,m,ans,c1;
long double a[100000],aaa;
int main()
{
    cin>>n;
    for(i=0;i<n;i++)
        cin>>a[i];
    n1=n/2;
        ans=0;
        j=0;
        while(j<n)
        {

            for(i=0,c=0,z=0;i<n;i++)
            {
               if(double(a[i]/a[j]) > 0)
                c++;
               if(a[i]==0.0)
                z++;
            }
            if(z>=n1)
               {
                   ans=1;
                   break;
               }
            else if(c>=n1)
            {
                   ans=2;
                   break;
            }
            else
                j++;
        }
        if(ans==1)
        cout<<"0"<<endl;
        else if(ans==2)
        cout<<a[j]<<endl;
}

#include <iostream>
#include <string>
#include<vector>
using namespace std;

vector <float>arr;
void main()
{
	int n, pos = 0, zero = 0;
	float c, les, q;
	cin >> n;
	q = n;
	if (n % 2 == 0)
		les = n/2;
	else
		les = q/2 + 0.5;
	for (int i = 0; i < n; i++)
	{
		cin >> c;
			if (c>0)
				pos++;
			if (c == 0)
				zero++;
		arr.push_back(c);
	}

	//cout << (les) << endl;
	//cout << pos << endl;
	if (pos - zero >= les)
	{
		cout << 1 << endl;
		return;
	}
	if (zero >= les)
	{
		cout << 0 << endl;
		return;
	}
	cout << -1 << endl;

}

#include<iostream>
#include<cstdio>
#include<string>

using namespace std;

int dx[] = {1, 1, -1, -1};
int dy[] = {1, -1, 1, -1};

int main()
{
    int n;
    cin >> n;
    double arr[n];
    int nop = 0, mn = 999999;
    for(int i =0; i < n; i++)
    {
        cin >> arr[i];
        if(arr[i] > 0)
        {
            nop++;
            if(mn > arr[i])
                mn = arr[i];
        }
    }
    int x = n/2;
    if(n&1)x++;
    if(nop < x)
    {
        cout << "0" << endl;
        return 0;
    }
    cout << mn << endl;

    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int n,nrpoz=0,nrneg=0,x,nr0=0;
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>x;
        if(x>0)
            nrpoz++;
        if(x<0)
            nrneg++;
        else
            nr0++;
}
       if(nrpoz>(float)(n/2))
        cout <<1;
       else
        if(nrneg>(float)(n/2))
        cout <<-1;
       else
        cout <<0;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main(){
	int n; cin >> n;
	int A[n], npos=0, nneg =0;
	for (int i = 0;i<=n;i++){
		cin >> A[i];
		if (A[i]>0) npos++;
		if (A[i]<0) nneg++;
	}
	if (npos>= ceil(n/2))
cout << "1";
	else if (nneg>=ceil(n/2))
cout << "-1";
else cout << "0";
	return 0;
}

#include<bits/stdc++.h>
#include<math.h>
using namespace std;

int main()
{
vector<long long int>a;

long long int n,x,cp,ctr=0,ctr1=0,ctr0 = 0;

cin >> n;
for(int i = 0;i < n;i++)
 {
    	cin >> x;
    	a.push_back(x);
    	cp = x;
    	if(x == 0)
    	           ctr0 ++;
    	else if( x > 0 )
    			   ctr ++;
    	else
    			   ctr1 ++;
  }

//cout << ctr0 << "\t" << ctr << "\t" << ctr1 << endl;

long long int size = (n % 2 == 0) ? (n/2):((n+1)/2);

//cout << size << endl;

if(ctr >= size)
		cout << 1;
else if(ctr0 >= size)
 		cout << 0;
else if(ctr1 >= size)
		cout << -1;
else
 	    cout << 0;
return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    double x=0;
    int n,ct=0,c=0,f=0;
    cin>>n;
    double a[n];
    for(int i=0; i<n; i++)
        cin>>a[i];
    for(int i=1; i<=1000; i++)
    {
        for(int j=0; j<n; j++)
        {
            x=a[j]/i;
            if(x>0)
                ct++;
            else if(x==0)
                c++;
        }
        if(ct>=(n/2)&&ct>c)
        {
            cout<<i<<endl;
            f=1;
            break;
        }
        ct=0;
    }
    if(f==0)
        cout<<0<<endl;
    return 0;
}

#include<bits/stdc++.h>
#include<math.h>
using namespace std;

int main()
{
vector<int>a;
int n,x,cp,ctr=0,ctr1=0,ctr0 = 0;
cin >> n;
for(int i = 0;i < n;i++)
 {
    	cin >> x;
    	a.push_back(x);
    	cp = x;
    	if(x == 0)
    	           ctr0 ++;
    	else if( x > 0 )
    			   ctr ++;
    	else
    			   ctr1 ++;
  }

 vector<int>::iterator it;
 sort(a.begin(), a.end());

/*
for(it = a.begin() ; it != a.end() ; ++it)
          cout << *it<<" \t";
 cout << endl;

cout << ctr0 << "\t" << ctr << "\t" << ctr1 << endl;
"*/

if(ctr0 >= (ceil(n/2)))
		cout << 0;
else if(ctr >= (ceil(n/2)))
 		cout << 1;
else if(ctr >= (ceil(n/2)))
		cout << -1;
else

return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int n, x, pve=0;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> x;
		if (x > 0)
			pve++;
	}
	if (pve >= ceil(n / 2.0))
		cout << 1;
	else
		cout << 0;
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int n,i,ct=0,ct0=0,tem,ct1;
    cin>>n;
    int arr[n];
    for(i=0;i<n;i++)
    {
        cin>>arr[i];

        if(0<arr[i])
            ct++;
        if(0<=arr[i])
            ct0++;
        if(0>arr[i])
            ct1++;
    }
    tem=n/2;
    if((n%2)!=0){
        tem++;
    }
    if(tem<=ct)
    {
        cout<<ct0<<endl;
    }
    else if(tem<=ct1){
    cout<<-1<<endl;
   }else{
    cout<<0<<endl;
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
int n,c=0,d;
cin>>n;
int arr[n];
for(int i=0;i<n;i++){
        cin>>arr[i];
        if(arr[i]!=0)c++;
    }
    if(n%2==0)d=n/2;
    else d=n/2+1;
    if(d<=c){
      for(int i=0;i<n;i++){
      if(arr[i]==0)continue;
        if((float)arr[i]/c==0.0){
            c=-c;
            break;
        }
    }
    cout<<c;
    }
    else cout<<0<<endl;
  }

#include <bits/stdc++.h>
using namespace std;

int n, a, mo, ma, z;

int main(){
	cin >> n;
	for(int i = 0 ; i < n ; i++){
		cin >> a;
		if(a > 0) mo++;
		if(a < 0) ma--;
		if(a == 0) z++;
	}
	if(z > n / 2) return cout << 0, 0;
	if(mo >= ma + z) cout << 1;
	else cout << -1;
}

#include <iostream>

#define enl "\n"
using namespace std;

int n,i,a[121],kol1,kol2,kol;

int main()
{
  ios::sync_with_stdio(0);
  cin.tie(0);

  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];

  for (i = 1; i <= n; i++) {
    if (a[i]>0) kol1++;
    if (a[i]<0) kol2++;
    if (a[i]==0) kol++;
  }
  if (kol1>=kol2 && kol<n/2) cout << 1 << endl;
  else
  if (kol2<kol1 && kol<n/2) cout << -1 << endl;
  else cout << 0 << endl;

  return 0;
}

#include<cstdio>
#include<iostream>
using namespace std;
int  a[100000];
int main()
{
	int sum=0,n;
	cin>>n;
	for(int i=0;i<n;i++)
		cin>>a[i];
	if(n%2==0){
		for(int i=0;i<n;i++){
			if(a[i]>=1)
				sum++;
		}
	if(sum>=n/2)
		cout<<"1"<<endl;
	else
		cout<<"0"<<endl;
	}
	else{
		for(int i=0;i<n;i++){
			if(a[i]>=1)
				sum++;
		}
		if(sum>(n/2+1))
		cout<<"1"<<endl;
		else
		cout<<"0"<<endl;
	}
	return 0;
}

#include<iostream>
#include<cstdio>
#include<cmath>
#define size 1000
using namespace std;
int main()
{ int array[size],n,cnt=0,i,d=0;
   double s;
   cin>>n;
   s=ceil(n/2.0);
  for(i=0;i<n;i++){
  cin>>array[i];
  if(array[i]>0 || array[i]<0)
    cnt++;
  }
  if(cnt>=s)

     cout<<cnt<<endl;

 else
    cout<<"0"<<endl;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n,p=0,l=0;
    cin>>n;
    long long a[1111];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]>0)
        p++;
        if(a[i]<0)
        l++;
    }
    long long k=(n+1)/2;
    if(p>=k)
        {cout<<1;return 0;}
    if(l>=k)
    {cout<<1;return 0;}

    else cout<<0;

}

//
#include <bits/stdc++.h>
#define lli long long int
#define mod 1000000007
#define inf 1000000000000000000
using namespace std;
int main ()
{
    int n;
    cin>>n;
    lli a[n];
    for (int i=0; i<n; i++) {
        cin>>a[i];
    }
    lli r=0, s=0, z=0, ans;
    for (int i=0; i<n; i++) {
        if (a[i]>=0) {
            r++;
        }
        else if (a[i]<0) {
            s++;
        }
        else {
            z++;
        }
    }
    if ((n%2==0 && z>n/2) || (n%2==1 && z>=n/2)) {
        ans=0;
    }
    else if (r>s) {
        ans=1;
    }
    else {
        ans=-1;
    }
    cout<<ans<<endl;
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int n,c=0,c1,h,c3,c6;
    cin>>n;

    bool tr=0;

   double *x;
   x=new double[n];

   for(int i=0;i<n;i++)
    cin>>x[i];

   c1=x[0];

   c6=x[0];
   h=n/2;

   for(int i=1;i<n;i++)
   {
       if(min(x[i],x[i-1])<c1)
        c1=x[i];
   }

   for(int i=1;i<n;i++)
   {
       if(max(x[i],x[i-1])>c6&&x[i]>0)
        c6=x[i];
   }

   for(int j=c1;j<=c6+1;j++)
   {

   for(int i=0;i<n;i++)
   {
       if((x[i]/j)>0)
        c++;

       if(c>h&&n%2!=0)
       {
           tr=1;
           c3=j;
           break;
       }
       if(c>=h&&n%2==0)
       {
           tr=1;
           c3=j;
           break;
       }
   }
   if(tr)
    break;

    c=0;
   }

   if(tr)
    cout<<c3<<endl;
   else
    cout<<0<<endl;

    return 0;
}

#include<bits/stdc++.h>
#include<string>
#include<math.h>
using namespace std;
int main()
{
    int a[10000];
    int n,k,i,l=0;

    cin>>n;
    for(i=0; i<n; i++)
    {
        cin>>a[i];
        //l+=a[i];
    }
    k=0;
    int j=0;
    for(i=0; i<n; i++)
    {
        if(a[i]<0)
        {
            k++;
        }
        if(a[i]>0)
        {
            l++;
        }
    }
    if(l*2>=n)
        cout<<"1"<<endl;
    else if(k*2>=n)
        cout<<"0"<<endl;
    else
        cout<<"-1"<<endl;
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main () {
	long long i,l,s,m,n,j,p;
	double x;

	cin >> n;

	long long a[n+1];
	m = 0;
	for ( i=1; i<=n; i++) {
		cin >> a[i];
		if ( a [ i ] > 0 ) m ++;
	}
	if ( m < ( n + 1 ) / 2 ) cout << "0\n";
		else cout << "1\n";
}

#include <bits/stdc++.h>

using namespace std;

int main() {
  int n;
  cin >> n;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x < 0 || x == 0) {
      cnt++;
    }
  }
  if (cnt > n / 2) {
    cout << 0 << '\n';
  } else {
    cout << 1 << '\n';
  }

  return 0;
}

#include<bits/stdc++.h>
#define test_
#define pb push_back
#define S second
#define F first
#define Sz(x) (int)(x).size()
#define all(x) (x).begin(),(x).end()
#define __IO ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define pii pair<int,int>
#define endl cout<<'\n';
#define rep(i , n) for(int mm=i ; mm<n ; ++mm)
using namespace std;
int main(){
//__IO
	int n;
	cin >> n;
	int cnt = 0;
	if(n == 1){
		int x;
		cin >> x;
		if(x > 0) cout << 1 << '\n';
		else cout << 0 << '\n';
		return 0;
	}
	for(int i=0 ; i<n ; ++i){
		int x ; cin >> x;
		if(x > 0) ++cnt;
	}
	int need ;
	if(n % 2 == 0) need = n/2;
	else need = n/2+1;
	if(cnt >= need){
		if(n%2 == 0) cout << n;
		else cout << n;
	}
	else cout << 0 << '\n';
}

#include <bits/stdc++.h>
using namespace std;
int n,x;
double arr[109];
int main(){
	cin>>n;
	x = n/2;
	if(x%2 != 0) x++;
	for(int i=0;i<n;i++) cin>>arr[i];
	int l=-1,r=1009;
	while(r-l > 1){
		double m = (l+r)/2;
		int ans = 0;
		for(int i=0;i<n;i++){
			if((double)arr[i]/m > 0) ans++;
		}
		if(ans >= x) l = m;
		else r = m;
	}
	if(l == -1) cout<<0<<endl;
	else cout<<l<<endl;
}

#include <iostream>
#include <algorithm>
#include <stdio.h>
using namespace std;
int main(){
	int n,m=0,num=0,sum=0,s;
	scanf("%d",&n);
	int a[n];
	for(int i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	for(int i=0;i<n;i++){
		if(a[i]>0) m++;
		if(a[i]<0) num++;
		if(a[i]==0) sum++;
	}
	if(m>=n/2) printf("1\n");
	else if(num>n/2) printf("-1\n");
	else printf("0\n");
	return 0;
}

#include <iostream>
#include <stack>
#include <queue>
#include <string>
#include <algorithm>

using namespace std;

#define ull unsigned long long
#define ll  long long

int main() {

	int n, d = 0;
	float tmp, arr[1000001], sum = 0;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> arr[i];
		if (arr[i] != 0)d++;
	}
	if (n % 2 == 0)tmp = n / 2;
	else tmp = n / 2 + 1;

	for (int i = 0; i < n; i++)
	{
		if (arr[i] /d <= tmp && arr[i] > 0)
			sum++;
	}
	if (sum >= tmp)
		cout << d << endl;
	else cout << 0 << endl;

	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define IO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)

int main()
{
    IO;
    int n, cntZ = 0, cntN = 0;
    cin >> n;
    int arr[n + 1];
    for(int i = 0; i < n; i++)
    {
        cin >> arr[i];
        if(arr[i] == 0)
            cntZ++;
        if(arr[i] < 0)
            cntN++;
    }
    if(cntZ >= n/2)
    {
        cout << 0;
        return 0;
    }
    if(cntN > n / 2)
    {
        cout << -1 * (n/2 + 1);
        return 0;
    }
    cout << 1 + n / 2;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;
int i, n, a[10000], ver, vern, jum;
int main()
{
    cin>> n;
    for(i=1;i<=n;i++){
        cin>> a[i];
        if(a[i]>0){
            ver++;
        }
        if(a[i]<0){
            vern++;
        }
    }
    jum=(n+1)/2;
    if(ver>=vern && ver>=jum){
        cout<< 2;
    }
    if(ver>=vern && ver<jum)
        cout<< 0;
    if(vern>=ver && vern>=jum)
        cout<< -2;
    if(vern>=ver && vern<jum)
        cout<< 0;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define forn(i, n) for (int i = 0; i < int(n); i++)
const int c=1000000007;

int main()
{
    int t, a[200], count1=0,count2=0, n;
    cin>>t;
    double ans;
    for(int i=0;i<t;i++){
        cin>>a[i];
        if(a[i] >0)count1++;
        if(a[i]<0)count2++;
    }
    if(t%2==0)n=t;
    else if(t%2!=0)n=t/2 +1;
    if(count1<n&&count2<n)cout<<0<<endl;
    else if(count1>=n&&count2<n)cout<<1<<endl;
    else if(count2>=n&&count2<n)cout<<-1<<endl;

}

#include<bits/stdc++.h>
using namespace std;
int arr[10005];
int axx[105][105];
int main(){
	int n;
	cin>>n;
	int c=(n+1)/2;
	int a1=0;
	int a2=0;
	int a3=0;
	for(int i=1;i<=n;i++){
		cin>>arr[i];
		if(arr[i]>0){
			a1++;
		}else if(arr[i]==0){
			a2++;
		}else{
			a3++;
		}
	}
	if(a1>=c){
		cout<<1<<endl;
	}
	else if(a3>=c){
		cout<<-1<<endl;
	}
	else if(a2>n-c){
		cout<<0<<endl;
	}
	return 0;
}

#include<bits/stdc++.h>
#include<string>
#include<math.h>
using namespace std;
int main()
{
    int a[10000];
    int n,k,i,l=0;

    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]>0)
        l+=a[i];
    }
    k=0;
    for(i=0;i<n;i++)
    {
        if(a[i]!=0)
            k++;
    }
    if(l<=k)
        cout<<"0"<<endl;
    else
        cout<<l/k<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

int a[200];
int main()
{
    int n;
    int sum = 0;
    int num = 0;
    scanf("%d", &n);
    for(int i = 0; i < n; i ++)
    {
        scanf("%d", &a[i]);
        if(a[i] == 0) sum ++;
        if(a[i] < 0) num ++;
    }
    int m;
    if(n % 2 != 0) m = n / 2 + 1;
    else m = n / 2;
    if(sum > m) {
        printf("0\n");
    }
    else if(num >= m) {
        printf("-1\n");
    }
    else if(n - sum - num >= m) {
        printf("1\n");
    }
    else if(sum == m)
    {
        int cnt = n - sum - num;
        if(num != 0 && cnt > 0) printf("0\n");
        else if(num > 0 && cnt != 0) printf("0\n");
        else printf("1\n");
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int v[105];

int main()
{
    int n;
    cin >> n;
    int nr = 0, maxim = 0;
    for (int i = 1; i <= n; i ++) {
        cin >> v[i];
        if (v[i] > 0) nr ++;
        if (v[i] > maxim) maxim = v[i];
    }
    if (n % 2) n = n / 2 + 1;
    else n = n / 2;
    if (nr >= n) cout << maxim + 1;
    else cout << 0;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long sp,n,i,tong=0;
	cin>>n;
	long long a[n+3];
	for(i=1;i<=n;i++)
	{
		cin>>a[i];
		if(a[i]>0)	tong++;
	}
	if(n%3==0)	sp=n/3;
	else sp=n/3+1;
	if(tong>=sp){
		cout<<1;
		return 0;
	}
	cout<<0;
	return 0;
}

/*
 * socode.online
 *
 * Author: 小螺号
 * E-mail: 598601767@qq.com
 * Time  : 2020-02-10 18:35:18
 */
#include <bits/stdc++.h>
using namespace std;

int a[105];
int ans1=0,ans2=0,ans3=0;

int main(){
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		if(a[i]>0){
			ans1++;
		}
		else if(a[i]<0){
			ans2++;
		}
		else{
			ans3++;
		}
	}
	if(ans1>=n/2){
		printf("1\n");
	}
	else if(ans2>=n/2){
		printf("-1\n");
	}
	else{
		printf("0\n");
	}
	return 0;
}

#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define vii vector<pair<int ,int > >
#define vi vector<int>
#define pii pair<int,int >
#define p_q priority_queue
const int  mod =1e9+7;
const int p_mod=998244353;
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
/*function
ceil() floor() __gcd() */
ll fast_pow(ll a,ll b){
	ll res=1;
	while(b){
		if(b&1)res=(res*a)%mod;
		b>>=1;
		a=(a*a)%mod;
	}
	return res%mod;
}
const int N=1e5+5;
int root[N],n;
void make_set(){for(int i=1;i<=n;i++)root[i]=i;}
int find_set(int x){return root[x]==x?root[x]:root[x]=find_set(root[x]);}
bool union_set(int x,int y){
	x=find_set(x);
	y=find_set(y);
	if(x==y)return false;
	return root[y]=root[x];
}
int a,b,c;
int main(){
	std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++){
    	int temp;
    	cin>>temp;
    	if(temp==0)a++;
    	if(temp>0)b++;
    	if(temp<0)c++;
	}
	//cout<<floor(n/2)<<endl;
	if(a>floor(n/2))cout<<0;
	else if(b>=floor(n/2))cout<<1;
	else if(c>=floor(n/2))cout<<-1;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

int32_t main()
{
    int a = 0, b = 0, c = 0, n , k;
    cin >> n;
    for(int i = 0; i < n; ++i){
        cin >> k;
        if(k == 0)c++; else
        if(k > 0)a++; else b++;
    }

    if(c > n / 2){
        cout << 0;
    } else {
        if(a > b){
            if(a <= n / 2) cout << 0; else cout << 1;
        } else {
            if(b <= n / 2) cout << 0; else cout << -1;
        }
    }
    return 0;
}

#include <iostream>
using namespace std;
int freq[5];
int main()
{
  int x,n,i;
  cin >> n;
  for(i = 1; i <= n; ++i)
    {
      cin >> x;
      if(x == 0)
        freq[0]++;
      else
        if(x < 0)
          freq[1]++;
        else
          freq[2]++;
    }
if(n == 1)
  {
  if(x > 0)
    cout << 1;
  else
    if(x == 0)
      cout << 0;
    else
      cout << - 1;
  return 0;
  }
 if(freq[2] >= n / 2 )
  cout << 0;
 else
  if(freq[1] >= n / 2)
    cout <<"-1";
  else
    cout << 0;
 return 0;
}

#include <iostream>
using namespace std;
int main()
{
	int n,t,s[105],flag=0,flag1=0,flago=0,d=0;;
	cin>>n;
	if(n&1)
	t=n/2+1;
	else
	t=n/2;
	cout<<t<<endl;
	for(int i=0;i<n;i++)
	{
		cin>>s[i];
		if(s[i]>0) flag++;
		else if(s[i]<0) flag1++;
		else if(s[i]==0)flago++;
	}
	if(flago>=t)
	 cout<<d<<endl;
	else
	{
		if(flag>=t)
		d=1;
		else if(flag1>=t)
		d=-1;
	}
	cout<<d<<endl;
	return 0;
}

#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
   ll n;
   cin>>n;
   ll a[n];
   ll c=0, k=(n+1)/2;
   ll b=k+1;
   ll p=0,s=0,m=0;
   for(ll i=0;i<n;i++)
   {
       cin>>a[i];
       if((float)(a[i]/(float)(b))>0)
       {
           c++;
       }
       if(a[i]>0)
       {
           p++;
       }
       if(a[i]<0)
       {
           s++;
       }
   }
   //cout<<c<<endl;
   //cout<<"positive"<<p<<endl<<"Negative"<<s<<endl;
   if(c<k)
   {
       cout<<0;
   }
   else if(p>s)
  {
    if(c>=k)
   {
       cout<<b;
   }
   else
   {
       cout<<0;
   }
  }
else if(s>p)
{
    cout<<-1;
}
else if(s==p)
{
    if(c>=k)
    {
        cout<<b;
    }
    else
    {
        cout<<0;
    }
}
}

                                                                                #include <bits/stdc++.h>
                                                                                #define debug(x) do{cerr<<setw(10)<<#x<<": "<<setw(5)<<(x)<<endl;}while(0)
                                                                                #define debugv(x) do{cerr<<setw(10)<<#x<<": ";\
                                                                                for(auto e:x)cerr<<setw(5)<<e<<" ";cerr<<endl;}while(0)
                                                                                #define iter(x) begin(x), end(x)
                                                                                #define range(a, b) (slice((a), (b) - (a), 1))
                                                                                #define f1(l,f,e) f(iter(l), [&](__typeof(l[0]) _1){return (e);})
                                                                                #define f2(l,f,e) f(iter(l), [&](__typeof(l[0]) _1, __typeof(l[0]) _2){return (e);})
                                                                                #define For(i, a, b) for (int i = (a); i <= (b); i++)
                                                                                using namespace std;
                                                                                using vai=valarray<int>;
                                                                                using sai=slice_array<int>;
                                                                                using vec=valarray<int>;
                                                                                struct mat {
                                                                                int r, c; vai d; mat(int r, int c) : r(r), c(c), d(r * c){};
                                                                                int &operator()(int rr, int cc) { return d[rr * c + c]; }
                                                                                sai row_(int rr) { return d[slice(rr * c, c, 1)]; }
                                                                                vai row(int rr) const { return d[slice(rr * c, c, 1)]; }
                                                                                sai col_(int cc) { return d[slice(cc, r, c)]; }
                                                                                vai col(int cc) const { return d[slice(cc, r, c)]; }
                                                                                void pp(){For(i,0,r-1){For(j,0,c-1)cout<<setw(3)<<d[i*c+j]<<" ";cout<<endl;}}
                                                                                };

signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  string s = "hello world";
  debug(f1(s, count_if, _1 % 2 == 0));

  return 0;
}

#include <bits/stdc++.h>
#include<vector>
#include<math.h>

using namespace std;

int main()
{
	int n,q,w,count=0;
	cin>>n;
	int a[n];
	for(int i=0;i<n;i++)
	   cin>>a[i];
	for(int i=0;i<n;i++)
	{
		if(a[i]>0)
		count++;
	}
    if(n%2==0)
    {
    	if(count>=(n/2))
    	{
		 cout<<1;
		 return 0;
	    }
	}
	else
	{
		if(count>=(n/2)+1)
		{
			cout<<1;
			return 0;
		}
	}
	cout<<0;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    for(int i=1;i<1000;i++){
        int count=0;
        for(int j=0;j<n;j++){
            if((a[j]/i)>0)
                count++;
        }
        if(count>=ceil(n/2)){
            cout<<i;
            return 0;
        }
    }
    cout<<"0";
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define IO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)

int main()
{
    IO;
    int n, pos = 0, neg = 0,z = 0;
    cin >> n;
    float arr[n + 1];
    for(int i = 0; i < n; i++)
    {
        cin >> arr[i];
        if(arr[i] == 0)
            z++;
        if(arr[i] < 0)
            neg++;
        if(arr[i] > 0)
            pos++;
    }
    if(pos >= n / 2)
        cout << 1;
    else if(z > n / 2)
        cout << 0;
    else if(neg >= n / 2)
        cout << -1;
    else cout << 0;
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int n,c=0,c1,h,c3,c6;
    cin>>n;

    bool tr=0;

   double *x;
   x=new double[n];

   for(int i=0;i<n;i++)
    cin>>x[i];

   c1=x[0];

   c6=x[0];
   h=n/2;

   for(int i=1;i<n;i++)
   {
       if(min(x[i],x[i-1])<c1&&x[i]>0)
        c1=x[i];
   }

   for(int i=1;i<n;i++)
   {
       if(max(x[i],x[i-1])>c6&&x[i]>0)
        c6=x[i];
   }

   for(int j=c1;j<=c6+1;j++)
   {

   for(int i=0;i<n;i++)
   {
       if((x[i]/j)>0)
        c++;

       if(c>h&&n%2!=0)
       {
           tr=1;
           c3=j;
           break;
       }
       if(c>=h&&n%2==0)
       {
           tr=1;
           c3=j;
           break;
       }
   }
   if(tr)
    break;

    c=0;
   }

   if(tr)
    cout<<c3<<endl;
   else
    cout<<0<<endl;

    return 0;
}

#include<iostream>
using namespace std;
int main() {
	int n, fu = 0, ling = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		int x;
		cin >> x;
		if (x == 0)
		{
			ling += 1;
		}
		else if (x < 0) { fu += 1; }
	}
	if (n - ling - fu > n / 2)cout << "1" << endl;
	else if (fu > n / 2)cout << "-1" << endl;
	else cout << "0" << endl;
	return 0;
}

#include <iostream>
#include <algorithm>
#include <stdio.h>
using namespace std;
int main(){
	int n,m=0,num=0,sum=0,s;
	scanf("%d",&n);
	int a[n];
	for(int i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	for(int i=0;i<n;i++){
		if(a[i]>0) m++;
		if(a[i]<0) num++;
		if(a[i]==0) sum++;
	}
	if(m>=n/2&&m>=num) printf("1\n");
	else if(num>=n/2&&num>m) printf("-1\n");
	else printf("0\n");
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    long long int n ;
    cin >> n;
    long long int h[n] ;
    for (int i =0 ; i<n;i++)cin >> h[i] ;
    long long int sus = (n + 1) / 2 ;
    long long int minn = 0 ;
    long long int n0 = 0 ;
    long long int n1 = 0 ;
    for (long long int i =0;i<n;i++)
    {if(h[i] < 0)minn++ ;
    if (h[i] == 0)n0++ ;
    if (h[i] > 0)n1++ ;
    }
    if (n0 >= sus&&n>2||n1==minn&&n>2||minn+n0>=sus&&n1+n0>=sus&&n>2)
    {
     cout << 0 ;
     return 0 ;
    }
    if (minn>= sus&&n>2)cout << "-1" ;
    else cout << "1" ;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
   int n,i;
   cin>>n;
   int arr[n];
   float arr2[n];
   int k;
   for(i=0;i<n;i++)
   {
       cin>>arr[i];
   }
   for(k=0;k<n;k++)
   {
       arr2[k]=(float)arr[k];
   }
   int count=0;
   for(i=0;i<n;i++)
   {
       if(arr[i]==0)
       {
           count++;
       }
   }
   int a;
   if(n%2==0)
   {
       a=n/2;
   }
   else
   {
       a=(n/2)+1;
   }
   int d,maxx,minn,j;
   maxx=arr[0];
   for(i=0;i<n;i++)
   {
       if(arr[i]>maxx)
       {
           maxx=arr[i];
       }
   }minn=arr[0];
   for(i=0;i<n;i++)
   {
       if(arr[i]<minn)
       {
           minn=arr[i];
       }
   }
   int count2;
    if(count>=a)
   {
       cout<<"0"<<endl;
   }
   else
   {
       for(j=minn;j<=maxx;j++)
       {
           count2=0;
           if(j!=0)
           {
               for(k=0;k<n;k++)
               {
                   if(arr2[k]/j>0)
                   {
                       count2++;
                   }
               }
               if(count2==a)
               {
                   d=j;
               }

           }
       }
       cout<<d<<endl;

   }

}

#include<bits/stdc++.h>
using namespace std;
int  main()
{
    int m,p=0,z=0,n=0;
    cin>>m;
    int a[m];
    for(int i=0;i<m;i++)
    {
        cin>>a[i];
        if(a[i]>0)
            {p++;}
        if(a[i]==0)
            {z++;}
        else{n++;}
    }
if(z>n/2)
{
    cout<<0;
    return 0;
}
if(p>n/2)
{
    cout<<5;
    return 0;
}
else{cout<<-5;}

}

#include<bits/stdc++.h>

using namespace std;

int main( )   {

    int arr[100],z,n,c=0,c1=0;
    cin>>n;

    z=ceil(n/2);

    if(z==0)  return 0;

    for(int i=0;i<n;i++)   {
        scanf("%d",&arr[i]);
    }

    for(int i=0;i<n;i++)   {
        if(arr[i]!=0) c++;
    }

  if(c<z)  printf("0\n");

  else {

      for(int i=0;i<n;i++)   {
         if((arr[i]/z)>0)   {
            c1++;
         }
      }

    if(c1>=z || c1>=n )  {
        printf("%d\n",c);
    }

    else {
        printf("0\n");
    }

  }

return 0;

}

#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
#define ll long long
#define pb push_back
#define mod 1000000000000000000
#define vi vector<int>
#define rep(i,a,b) for(ll i=a;i<b;i++)

using namespace std;

int main()
{
   int n,cnt=0,m=0,mi=0;
   cin>>n;
   vi v(n);
   rep(i,0,n){
       cin>>v[i];
       if(v[i]==0) cnt++;
       if(v[i]>0) m++;
       else mi++;
   }
   if(cnt<ceil(n/2)){
       if(m>mi)cout<<*max_element(v.begin(),v.end())<<endl;
       else cout<<*min_element(v.begin(),v.end())<<endl;
       return 0;
   }
   cout<<0<<endl;
    return 0;
}

#include <iostream>

using namespace std;

int a[1007];
long long n,jn,nr0,nrneg,i;

int main()
{
    cin >> n;
    for (i=1;i<=n;i++){
        cin >> a[i];
    }
    if (n%2==1)
        jn=n/2+1;
    else
        jn=n/2;
    for (i=1;i<=n;i++){
        if (a[i]<0)
            nrneg=nrneg+1;
        else if (a[i]==0)
            nr0=nr0+1;
    }
    if (n%2==0 && nr0>=2){
        cout << 0;
    }
    else if (n==1){
        if (n>0)
            cout << 1;
        else if (n<0)
            cout << -1;
        else
            cout << 0;
    }
    else if (n==2){
        if (nrneg>=jn)
            cout << -1;
        else
            cout << 1;
    }
    else if (nr0>=jn-1)
        cout << 0;
    else if (nrneg>=jn)
        cout << -1;
    else
        cout << 1;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n,p=0,l=0;
    cin>>n;
    long long a[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]>0)
        p++;
        else
        l++;
    }
    long long k=(n/2)+(n%2);
    if(p>=k)
        cout<<1;
    else if(l>=k)
        cout<<1;
    else cout<<0;

}

#include <iostream>

using namespace std;

int main()
{
    long long int n ;
    cin >> n;
    long long int h[n] ;
    for (int i =0 ; i<n;i++)cin >> h[i] ;
    long long int sus = (n + 1) / 2 ;
    long long int minn = 0 ;
    long long int n0 = 0 ;
    long long int n1 = 0 ;
    for (long long int i =0;i<n;i++)
    {if(h[i] < 0)minn++ ;
    if (h[i] == 0)n0++ ;
    if (h[i] > 0)n1++ ;
    }
    if (n0 >= sus&&n>2||n1==minn||minn+n0>=sus&&n1+n0>=sus)
    {
     cout << 0 ;
     return 0 ;
    }
    if (minn>= sus&&n>2)cout << "-1" ;
    else cout << "1" ;
    return 0;
}

#include <iostream>
using namespace std;

int main()
{
    int nt ; cin>>nt;
    int a[nt];
    int p=0,n=0,z=0;
    for(int i=0; i<nt ;i++)
    {
        cin>>a[i];
        if(a[i]>0) p++;
        else if(a[i]<0) n++;
        else z++;
    }
    if(z>0)
    {
        cout<<0;
        return 0;
    }
    else if(p>n)cout<<1;
    else cout<<-1;
    return 0;
}

#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int n;
    scanf("%d", &n);
    int a[n+1];

    int x = 0;
    for (int i = 1; i <= n; i++) {
        scanf("%d", &a[i]);
        if (a[i] > 0) x++;
    }

    int sz;
    if (n %2 != 0) sz = (n / 2) + 1;
    else sz = n/ 2;

    if (x >= sz) cout << "2" << endl;
    else cout << "0" << endl;
}

#include <bits/stdc++.h>
#include <ctime>
#include <sstream>
#define weewoo ios::sync_with_stdio(false);cin.tie(0)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ld long double
#define ll long long
#define se second
#define fi first
#define ctoi(x) x-'0'
#define pi (acos(-1))
#define MOD 1e9+7
#define llputin(a) ll x;cin >> x;a.push_back(x)
#define iputin(a) int x;cin >> x;a.push_back(x)
using namespace std;

ll pw(ll x,ll a){
    if(a==0)
        return 1;
    ll t = pw(x,a/2);
    if(a%2==0)
        return (t*t);
    else
        return (t*t*x);
}

bool prime(int x)
{
    if(x < 2) return false;
        for(int i=2; i<= sqrt(x); i++) {
            if ((x%i) == 0) return false;
        }
    return true;
}

int main()
{
    weewoo;
    ll n;
    cin >> n;
    ll p=0,ne=0;
    for(int i=0;i<n;i++){
        ll x;cin >> x;
        if(x>0)
            p++;
        else if(x<0)
            ne++;
    }
    if(p>=n/2)
        cout << 1;
    else if(ne>=n/2)
        cout << -1 << endl;
    else
        cout << 0 << endl;
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int i,t,n1,p = 0 , z = 0, n = 0;
    cin>>t;
    int a[t];

    if(t%2 == 0)
    n1 = n/2;

    else
    n1 = (t/2) + 1;

    for(i = 0 ; i< t ; i++)
    {
        cin>>a[i];

        if(a[i] < 0)
        n++;

        else if(a[i] > 0)
        p++;

        else
        z++;
    }

    if(t%2 != 0)
    {
        if(n >= n1)
        cout<<-1;

        else if(p >= n1)
        cout<<1;

        else
        cout<<0;
    }

    else
    {
        if(n > n1)
        cout<<-1;

        else if(p > n1)
        cout<<1;

        else
        cout<<0;
    }

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(){
	long long n,coun=0,num;
	cin>>n;
	for (int i=0;i<n;i++){
		cin>>num;
		if (num>0) coun++;
	}
	if ((n%2==0 && coun>=n/2) || (n%2==1 && coun>=n/2+1)){
		cout<<1;
		return 0;
	}
	cout<<0;
	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int n;
	int num[101],sum1=0,sum2=0;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>num[i];
		if(num[i]>0){
			sum1++;
		}
		else if(num[i]<0){
			sum2++;
		}
	}
	double a=n/2.0;
    double z=(double)sum1+(double)sum2;
	if(sum1<a||sum2<a)cout<<"0"<<endl;
     else {
		if(sum1>sum2)cout<<"2"<<endl;
		else cout<<"-2"<<endl;
	}

}

#include <bits/stdc++.h>

using namespace std;

bool desc (pair <char, long long>& a, pair <char, long long>& b)
{
    //return ((a.second > b.second)
    //      ||
    //    ((a.second == b.second) && (a.first < b.first))
    //  );

    if (a.second == b.second)
        return a.first < b.first;
    return a.second < b.second;
}

int binary (vector <long long> v, long long n, long long x)
{
    long long st = 0, en = n;
    while (st <= en)
    {
        long long mid = st + (en - st) / 2;
        if (v[mid] == x)
        {
            return mid;
        }
        if (v[mid] < x)
        {
            st = mid + 1;
        }
        else if (v[mid] > x)
        {
            en = mid - 1;
        }
    }
    //return mid;
}

int arr[100001];
void sieve ()
{
    arr[0] = 1;
    arr[1] = 1;
    for (long long i = 2; i < 100001; i ++)
    {
        if (arr[i] == 0)
        {
            for (long long j = i * 2; j < 100001; j += i)
            {
                arr[j] = 1;
            }
        }
    }
}

bool isPrime(long long n)
{
    // Corner cases
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (long long i = 5; i * i <= n; i = i + 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;

    return true;
}
long long hcf(long long a, long long b)
{
    if (b == 0)
        return a;
    return hcf(b, a % b);

}

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout.tie(0);

    long long t, p = 0, n = 0;
    cin >> t;
    for (long long i = 0; i < t; i ++) {
        long long x;
        cin >> x;
        if (x > 0) {
            p ++;
        }
        else if (x < 0) {
            n --;
        }
    }
    if (p >= t / 2) {
        cout << 2;
    }
    else if (n >= t / 2) {
        cout << -2;
    }
    else {
        cout << 0;
    }
    cout << "\n";

    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main() {
    int b,c=0,c1=0,c2=0;
    cin>>b;
    int a[b];

    for(int i=0;i<b;i++)
    {
        cin>>a[i];
    }
     if(b==1&&a[0]!=0)
    {
        if(a[0]>0)
            cout<<1;
         else
            cout<<-1;
        return 0;
    }
    else
    {
        cout<<0;
        return 0;
    }
    for(int i=0;i<b;i++)
    {
       if(a[i]==0)
       {
           c+=1;
       }
       if(a[i]<0)
       {
           c1+=1;
       }
       if(a[i]>0)
       {
           c2+=1;
       }
    }
    if(c>=ceil(b/2))
    {
        cout<<0;
        return 0;
    }
    if(c1>=ceil(b/2))
    {
        cout<<-1;
        return 0;
    }
    if(c2>=ceil(b/2))
    {
        cout<<1;
    }
    return 0;
}

#include<iostream>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int a[n],count=0,step=0,cnt=0;
    for(int i=0;i<n;i++){
        cin>>a[i];
        if(a[i]>0) count++;
        else if(a[i]==0)step++;
        else cnt++;
    }
    if(count>=step && count>=cnt) cout<< 2;
    else if(step>count || step>cnt) cout<<0;
    else cout<<-2;
    return 0;
}

#include<iostream>
using namespace std;

int main(){
    int n;
    while(cin>>n){
        int a;
        double ans=n/2.00;
        double cnt=0;
        while(n--){
            cin>>a;
            if(a>0){cnt+=1;}
        }
    //cout<<cnt<<" "<<ans<<endl;
        if(cnt>=ans){
            cout<<"1"<<endl;
        }else{
            cout<<"0"<<endl;
        }
    }
return 0;
}

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<queue>
#include<map>
#include<stack>
#include<string>
#include<algorithm>
#include<cmath>
#define rg register
#define il inline
using namespace std;
typedef unsigned long long ll;
ll read(){
    ll ans=0,flag=1;char ch;
    while((ch=getchar())<'0'||ch>'9') if(ch=='-') flag=-1;
    ans=ch^48;
    while((ch=getchar())>='0'&&ch<='9') ans=(ans<<3)+(ans<<1)+(ch^48);
    return flag*ans;
}
void W(ll x){
    if(x<0){putchar('-');x=-x;}
    if(x>9) W(x/10);
    putchar(x%10+'0');
}
void write(ll x,char c){W(x);putchar(c);}
int main(){
    int n=read();
    int t=0,z=0,p=0,c=0;
    for(rg int i=0;i<n;i++){
        t=read();
        if(t==0) z++;
        else if(t>0) p++;
        else c++;
    }
    if(z>=(n+1)/2) puts("0");
    else if(p>=(n+1)/2) puts("1");
    else if(c>=(n+1)/2)puts("-1");
    else puts("0");
    return 0;
}

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int n, a, count1=0, count2=0;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a;
		if (a > 0) count1++;
		if (a < 0) count2++;
	}
	if (count1 >= ceil(n / 2)) cout << 1;
	if (count2 >= ceil(n / 2)) cout << -1;
	else cout<<0;
	return 0;
}

#include <iostream>
#include <algorithm>
using namespace std;
int a[105];
int main()
{int n;
cin>>n;
for(int i=0;i<n;i++)
    cin>>a[i];
    sort(a,a+n);int u=n%2==0?(n/2):n/2+1;
    if(a[n-1]<u||a[n-1]/1000>u)
        cout<<0<<endl;
    else
   cout<<1000<<endl;

}

#include <iostream>

using namespace std;

int main()
{
    int N, cntneg, cntpos, ans;
    cin >> N;
    int a[N];
    for(int i = 0; i < N; i++){
        cin >> a[i];
    }
    cntneg = 0;
    cntpos = 0;
    for(int i = 0; i < N; i++){
        if(a[i] > 0){
            cntpos++;
        }
        if(a[i] < 0){
            cntneg++;
        }
    }
    ans = max(cntneg, cntpos);
    if((ans >= N / 2 and ans % 2 == 0) or (ans >= N / 2 and ans % 2 == 1)){
        if(ans == cntpos){
            cout << 1;
        }
        else if(ans == cntneg){
            cout << -1;
        }
    }
     else{
        cout << 0;
        }
    return 0;
}

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
typedef long long ll;
const int Max = 3e5 + 10;
const int inf = 0x3f3f3f3f;

int a[Max];

int main()
{
	int n;
	while (scanf("%d", &n) != EOF)
	{
		int sum_positive = 0;	//正数
		int sum_negative = 0;	//负数
		for(int i = 0 ; i < n ;  i++)
		{
			scanf("%d", a + i);
			if(a[i] > 0)
			{
				sum_positive++;
			}
			else if(a[i] < 0)
			{
				sum_negative++;
			}
		}
		if(sum_positive >= n / 2)
		{
			printf("1\n");
		}
		else if(sum_positive >= n / 2)
		{
			printf("-1\n");
		}
		else
		{
			printf("0\n");
		}

	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
int a[105];
int main()
{
    fastio;
    int n,i,c=0,c1=0,s=0;
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]==0)
            c++;
        else if(a[i]>0){
            c1++;
            s+=a[i];
        }
    }
    if(c>(n/2))
    {
        cout<<0<<"\n";
        return 0;
    }
    else if(c1>(n/2))
    {
        cout<<s/c1<<"\n";
    }
    return 0;
}

// Primer.cpp : Diese Datei enthält die Funktion "main". Hier beginnt und endet die Ausführung des Programms.
//

#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <math.h>
using namespace std;

int main()
{
	vector<float> numbers;
	int arrSize, number;
	cin >> arrSize;

	float halfArray = arrSize / 2, posSum, negSum;

	number = 0;
	posSum = negSum = 0.0f;

	for (int i = 0; i < arrSize; i++) {
		cin >> number;

		if (number > 0) {
			posSum += number;
		}
		else if (number < 0) {
			negSum += (-1) * number;
		}
		numbers.push_back(number);
	}

	if (posSum < halfArray && negSum < halfArray) {
		cout << 0 << endl;
	}
	else {
		float erg = 0.0f;
		for (float i = 1; i < 10 * 10 * 10; i++) {
			if ((posSum / i) >= halfArray) {
				erg = i;
				break;
			}
		}

		if (negSum > posSum) {
			erg *= -1;
		}

		cout << erg << endl;
	}
}

#include<bits/stdc++.h>
#include<string>
#include<math.h>
using namespace std;
int main()
{
    int a[10000];
    int n,k,i,l=0;

    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        //l+=a[i];
    }
    k=0;
    for(i=0;i<n;i++)
    {
        if(a[i]==0)
            k++;
        else
            l++;
    }
    if(k>l)
        cout<<"0"<<endl;
    else
        cout<<"1"<<endl;
    return 0;
}

#include<bits/stdc++.h>
typedef double          D;
typedef long long int   LL;
typedef long double     LD;
#define OR              ||
#define AND             &&
#define nl              '\n'
#define S               string
#define inf             INT_MAX
#define SQR(a)          (a) * (a)
#define pb              push_back
#define GCD(a, b)       __gcd(a, b)
#define PI              2.0*acos(0.0)
#define pii             pair<int,int>
#define pll             pair<long long,long long>
#define LCM(a, b)       (a * b) / GCD(a, b)
#define mem(a,b)        memset(a,b,sizeof(a))
#define srtv(v)         sort(v.begin(),v.end())
#define T               int t; cin>>t; while(t--)
#define Rep(i,a,b)      for(int i = a; i <= b; i++)
#define rep(i,a,b)      for(int i = a; i >= b; i--)
#define boost           ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define inout           freopen("input.txt","r",stdin);freopen("output.txt","w",stdout)

#define si(x)           scanf("%d",&x)
#define pi(x)           printf("%d",x)
#define ss(str)         scanf("%s",str)
#define pl(x)           printf("%lld",x)
#define sl(x)           scanf("%lld",&x)
#define sii(x,y)        scanf("%d %d",&x,&y)
#define sll(x,y)        scanf("%lld %lld",&x,&y)
#define siii(x,y,z)     scanf("%d %d %d",&x,&y,&z)
#define slll(x,y,z)     scanf("%lld %lld %lld",&x,&y,&z)
using namespace std;

/*
int bs(int l,int r,int n)
{
    int mid,res=inf;

    while(l<=r)
    {
        mid=l+(r-l)/2;

        if(check(mid,n))
        {
            r=mid-1;
            res=min(res,mid);
        }
        else
            l=mid+1;

    }

    return res;
}
*/

int main()
{
    int n;
    si(n);

    int a[n+2];
    int count=0;

    Rep(i,1,n)
    {
        si(a[i]);

        if(a[i]>0)
            count++;
    }

    if(count>=(n+1)/2)
        printf("1\n");
    else
        printf("0\n");

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int arr[101],b,n,co=0,k,p;
    cin>>n;
    if(n%2==0)
        b=n/2;
    else
        b=n/2+1;
    for(int i=0; i<n; i++)
    {
        cin>>k;
        if(k>0)
            co++;
    }
    if(co>b)
        cout<<1<<endl;
    else
        cout<<0<<endl;
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    long long n;
    cin>>n;
    long long a[n];
    for(long long i=0;i<n;i++){
        cin>>a[i];
    }
    long long cont=0,res=0,r=0,c=0;

    for(long long i=2;i<=1002;i++){
            cont =0; c=0;
        for(int j=0;j<n;j++){

            if(a[j]/i>0){
                cont++;
                res=i;
            }
            if(a[j]/-i>0){
                c++;
                r=-i;
            }
        }
        if(cont>=n/2){
            cout<<res;

            break;
        }
        if(c>=n/2){
            cout<<r;

            break;
        }
        if(i==1002){
            cout<<0;
            break;

        }
    }

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t,cnt=0,pos=0,neg=0;
    scanf("%d",&t);
    int a[105];
    memset(a,0,sizeof(a));
    for(int i=0;i<t;i++)
    {
        scanf("%d",&a[i]);
        if(a[i]==0)
            cnt++;
        else   if(a[i]>0)
        {
            pos++;
        }
        else
            neg++;
    }
    int x=ceil(t/2);
    if(cnt>x)
        printf("0\n");
    else if(pos>=x)
    {
        printf("1\n");
    }
    else
        printf("-1\n");
    return 0;
}

#include <iostream>
using namespace std;
int freq[5];
int main()
{
  int x,n,i;
  cin >> n;
  for(i = 1; i <= n; ++i)
    {
      cin >> x;
      if(x == 0)
        freq[0]++;
      else
        if(x < 0)
          freq[1]++;
        else
          freq[2]++;
    }
 if(freq[0] > n / 2 && n != 1)
  cout << 0;
 else
  if(freq[1] > n / 2)
    cout <<"-1";
  else
    cout << 1;
 return 0;
}

#include<iostream>
#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int main()
{
    ll n,ch;cin>>n;ll pos=0,neg=0;float div;
    if(n%2==0)
        ch=n/2;
    else
        ch=n/2+1;
        //cout<<ch<<endl;
    float a[n];for(ll i=0;i<n;i++){
        cin>>a[i];
        if(a[i]>0)
            pos++;
        else
            neg++;
    }
    div=pos>=neg?1.0:-1.0;
    ll coun=0;
    for(ll i=0;i<n;i++)
    {
        a[i]=a[i]/(div);
        if(a[i]>0)
            ++coun;
        else
            continue;
    }
    //cout<<coun<<endl;
    if(coun>=ch)
        cout<<coun;
    else
        cout<<0;
}

#include<bits/stdc++.h>
using namespace std;
long long took[100009];
int main()
{
    long long pos=0,neg=0;
    double n;
    cin>>n;
    long long add = ceil(n/2);
    for(int i=0; i<n; i++)
    {
        cin>>took[i];
        if(took[i]>0)++pos;
        if(took[i]<0)++neg;

    }
    if(pos>=add)cout<<1<<endl;
    else if(neg>add)cout<<-1<<endl;
    else cout<<0<<endl;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long sp,n,i,tong=0;
	cin>>n;
	long long a[n+3];
	for(i=1;i<=n;i++)
	{
		cin>>a[i];
		if(a[i]>0)	tong++;
	}
	if(n%3==0)	sp=n/3;
	else sp=n/3+1;
	if(tong>=sp){
		cout<<1;
		return 0;
	}
	cout<<0;
	return 0;
}

#include<bits/stdc++.h>

using namespace std;
const int maxn = 2e5+10;

int a[maxn];
int num[maxn];
int step[maxn];

int main()
{
    int n;
    int i;
    cin>>n;
    int ans = 0;
    int res = 0;
    for(i=0; i<n; i++)
    {
        int x;
        scanf("%d",&x);
        if(x>0)
            ans++;
        else if(x<0)
            res++;
    }
    if(n%2!=0)
        n++;
    if(ans>=n/2+1)
        cout<<1<<endl;
    else if(res>=n/2+1)
        cout<<-1<<endl;
    else
        cout<<0<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,nonNegative=0,negative=0,zer0=0;
    cin>>n;
    int x=(n/2)+1;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(arr[i]>0)
        {
            nonNegative++;
        }
        else if(arr[i]<0)
        {
            negative++;
        }
        else
        {
            zer0++;
        }

    }
    if(zer0>=x)
     cout<<0;
    else   if(nonNegative>negative)
    {   if(nonNegative>x)
            cout<<x;
        else
        {
            cout<<0;
        }

    }
    else
    {
        int dummy=x-(x*2);
        if(negative>x)
            cout<<dummy;
        else
        {
            cout<<0;
        }

    }

}

#include <bits/stdc++.h>

using namespace std;

int main() {
    int n, v, zr = 0, ps = 0, ng = 0;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &v);
        if (v == 0) {
            zr++;
        }
        else if (v > 0) {
            ps++;
        }
        else {
            ng++;
        }
    }
    if (zr > n/2) {
        printf("0\n");
    }
    else {
        if (ps > ng) {
            printf("1\n");
        }
        else {
            printf("-1\n");
        }
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a,b,menos=0,maximo=0;
    cin >> a;
    for(int i=0;i<a;i++){
        cin >> b;
        if(b<0){
            menos--;
        }
        else if(b>0){
            maximo++;
        }
    }
    if(a/2<abs(menos) || a/2<maximo){
        cout << max(abs(menos),maximo);
    }
    else{cout << "0";}
}

    #include<bits/stdc++.h>
    using namespace std;
    typedef long long int ll;
    typedef long double ld;
    typedef pair<int,int> pi;
    typedef pair<ll,ll> pll;
    #define Max 1000001
    #define inf INT_MAX
    #define llinf LONG_LONG_MAX
    #define fast ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
    #define pb push_back
    #define F first
    #define S second
    #define all_v v.begin(),v.end()
    #define E cout<<endl;
    #define for_i(j,n) for(int i=j;i<n;i++)

    /*
    ll binary_to_decimal(string binary_string)
    {
        ll number = stoi(binary_string,0,2);
        return number;
    }

    bool isPrime(ll n)
    {
        // Corner cases
        if (n <= 1)
            return false;
        if (n <= 3)
            return true;

        // This is checked so that we can skip
        // middle five numbers in below loop
        if (n % 2 == 0 || n % 3 == 0)
            return false;

        for (int i = 5; i * i <= n; i = i + 6)
            if (n % i == 0 || n % (i + 2) == 0)
                return false;

        return true;
    }

    ll fact(ll n);

    ll nCr(ll n, ll r)
    {
        return fact(n) / (fact(r) * fact(n - r));
    }

    // Returns factorial of n
    ll fact(ll n)
    {
        ll res = 1;
        for (int i = 2; i <= n; i++)
            res = res * i;
        return res;
    }
    */

    int main()
    {
        int n;
        cin>>n;

        int cnt0=0,cnt1=0,cnt_neg=0;
        int a[n];
        for_i(0,n)
        {
            cin>>a[i];
            if(a[i]==0) cnt0++;
            else if(a[i]<0) cnt_neg++;
            else cnt1++;
        }
        //cout<<cnt_neg<<endl<<cnt0<<endl<<cnt1<<endl;
        int temp=n/2;
        if(cnt0>temp)
        {
            cout<<0;
            exit(0);
        }
        else if(cnt0==temp)
        {
            if(cnt0<=cnt1)
            {
                cout<<1;
                exit(0);
            }
            else if(cnt0<=cnt_neg)
            {
                cout<<-1;
                exit(0);
            }
            else
            {
                cout<<0;
                exit(0);
            }
        }
        else if(cnt0<temp)
        {
            if(cnt1>cnt_neg)
            {
                cout<<1;
                exit(0);
            }
            else if(cnt1<cnt_neg)
            {
                cout<<-1;
                exit(0);
            }
            else if(cnt0==0 && cnt1==cnt_neg)
            {
                cout<<1;
                exit(0);
            }
            else
            {
                cout<<0;
                exit(0);
            }
        }

    }