//Bai 18
#include<bits/stdc++.h>
using namespace std;
#define el "\n"
#define ll long long
#define ull unsigned long long
#define se second
#define fi first
#define be begin()
#define en end()
#define Faster cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
int n;
unordered_map<int,int> mp;
void Run()
{
cin >> n;
int mid = (n + 1) / 2;
while(n--)
{
int x; cin >> x;
mp[x]++;
if(n == mid) mid = x;
}
cout << mp[mid];
}
int main()
{
Faster;
Run();
return 0;
}
Ly9CYWkgMTgKCiNpbmNsdWRlPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNkZWZpbmUgZWwgIlxuIgojZGVmaW5lIGxsIGxvbmcgbG9uZwojZGVmaW5lIHVsbCB1bnNpZ25lZCBsb25nIGxvbmcKI2RlZmluZSBzZSBzZWNvbmQKI2RlZmluZSBmaSBmaXJzdAojZGVmaW5lIGJlIGJlZ2luKCkKI2RlZmluZSBlbiBlbmQoKQojZGVmaW5lIEZhc3RlciBjaW4udGllKDApOyBjb3V0LnRpZSgwKTsgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbygwKTsKaW50IG47CnVub3JkZXJlZF9tYXA8aW50LGludD4gbXA7CnZvaWQgUnVuKCkKewogICAgY2luID4+IG47CiAgICBpbnQgbWlkID0gKG4gKyAxKSAvIDI7CiAgICB3aGlsZShuLS0pCiAgICB7CiAgICAgICAgaW50IHg7IGNpbiA+PiB4OwogICAgICAgIG1wW3hdKys7CiAgICAgICAgaWYobiA9PSBtaWQpIG1pZCA9IHg7CiAgICB9CiAgICBjb3V0IDw8IG1wW21pZF07Cn0KaW50IG1haW4oKQp7CiAgICBGYXN0ZXI7CiAgICBSdW4oKTsKICAgIHJldHVybiAwOwp9Cgo=