#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
using namespace std;

#define SET(p) memset(p, -1, sizeof(p))
#define CLR(p) memset(p, 0, sizeof(p))
#define MEM(p, v) memset(p, v, sizeof(p))
#define CPY(d, s) memcpy(d, s, sizeof(s))
#define ll long long
#define ld long double
#define mod 1000000007
#define inf 1LL<<60
#define pii pair< int, int >
#define pll pair< ll, ll >
#define psi pair< string, int >
#define N 1001
int a[N][N];
bool vis[N];
int n;
int cnt1,cnt2;
void go(int cur){
	vis[cur] = true;
	cnt1++;
	for(int i=0;i<n;i++){
		if(!vis[i] && a[cur][i]){
			go(i);
		}
	}
}
void go1(int cur){
	vis[cur] = true;
	cnt2++;
	for(int i=0;i<n;i++){
		if(!vis[i] && a[i][cur]){
			go1(i);
		}
	}
}
int main(int argc, char const *argv[])
{
	ios::sync_with_stdio(false);
	cin>>n;
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			cin>>a[i][j];
		}
	}
	go(1);CLR(vis);go1(1);
	if(cnt1!=n || cnt2!=n){
		printf("NO\n");
	}
	else{
		printf("YES\n");
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 2005;

vector<int> g[N];

int main(int argc, char *argv[]) {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      int t;
      cin >> t;
      if (t) g[i].push_back(j);
    }
  }
  bool ok = true;
  for (int i = 1; i <= n; ++i) {
    vector<bool> vis(n + 1);
    vis[i] = true;
    queue<int> q;
    q.push(i);
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      for (auto v : g[u]) {
        if (!vis[v]) vis[v] = true, q.push(v);
      }
    }
    for (int j = 1; j <= n; ++j) {
      ok &= vis[j];
    }
  }
  puts(ok ? "YES" : "NO");
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(int argc, char *argv[]) {
  cin.sync_with_stdio(false);
  int n, K;
  cin >> n >> K;
  vector<ll> a(1e7 + 5, 0);
  auto b = a;
  for (int i = 0; i < n; ++i) {
    int t;
    cin >> t;
    a[t]++;
  }
  int mx = -1;
  for (int i = 1e7; i >= 1; i--) {
    if (i * 2 <= 1e7) a[i] += a[i * 2] + a[i * 2 + 1];
    b[i] = a[i] + b[i + 1];
    if (i * 2 - 1 <= 1e7) a[i] += a[i * 2 - 1] + a[i * 2];
    if (b[i] >= K) {
      mx = i;
      break;
    }
  }
  cout << mx << endl;
  return 0;
}


#include <bits/stdc++.h>

struct Tarjan {
  const std::vector<std::vector<int>> &g;
  std::vector<int> st, sta, dfn, low;
  int n, scc, lay;

  Tarjan(const std::vector<std::vector<int>> &graph, int base = 1) : g(graph) {
    n = (int)g.size();
    scc = lay = 0;
    sta = dfn = low = std::vector<int>(n);
    for (int i = base; i < n; i++) if (!sta[i]) dfs(i);
  }

  void dfs(int u) {
    sta[u] = 1;
    dfn[u] = low[u] = ++lay;
    st.push_back(u);
    for (auto v : g[u]) {
      if (sta[v] == 0) dfs(v);
      if (sta[v] == 1) low[u] = std::min(low[u], low[v]);
    }
    if (low[u] == dfn[u]) {
      scc++;
      while (true) {
        int v = st.back();
        st.pop_back();
        low[v] = scc;
        sta[v] = 2;
        if (v == u) break;
      }
    }
  }
};

using namespace std;
const int N = 2005;
vector<vector<int>> g;

int main(int argc, char *argv[]) {
  cin.sync_with_stdio(false);
  int n;
  cin >> n;
  g.resize(n + 1);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      int t;
      cin >> t;
      if (t) g[i].push_back(j);
    }
  }
  puts(Tarjan(g).scc == 1 ? "YES" : "NO");
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 2005;

vector<int> g[N];

int main(int argc, char *argv[]) {
  cin.sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      int t;
      cin >> t;
      if (t) g[i].push_back(j);
    }
  }
  bool ok = true;
  for (int i = 1; i <= n; ++i) {
    vector<bool> vis(n + 1);
    vis[i] = true;
    queue<int> q;
    q.push(i);
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      for (auto v : g[u]) {
        if (!vis[v]) vis[v] = true, q.push(v);
      }
    }
    for (int j = 1; j <= n; ++j) {
      ok &= vis[j];
    }
  }
  puts(ok ? "YES" : "NO");
  return 0;
}


#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define endl '\n'

using namespace std;

const int maxn = 2003;

int n, m;
int a[maxn][maxn];
void read()
{
	cin >> n >> m;
	for (int i = 1; i <= n; i++)
	for (int j = 1; j <= m; j++)
	cin >> a[i][j];
}

void solve()
{
	bool is = false;
	for (int i = 1; i <= n; i++)
	for (int j = 1; j <= n; j++)
	if (i != j)
	if (a[i][j] > 0)
	is = true;

	if (is)
	cout << "YES" << endl;

	else
	cout << "NO" << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	read();
	solve();
}


#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define endl '\n'

using namespace std;

const int maxn = 2003;

int n;
int a[maxn][maxn];
void read()
{
	cin >> n;
	for (int i = 1; i <= n; i++)
	for (int j = 1; j <= n; j++)
	cin >> a[i][j];
}

vector <int> rev_adj[maxn], adj[maxn];
vector <int> order;
bool used[maxn];
void dfs1(int ver)
{
	used[ver] = true;
	for (auto i: adj[ver])
	if (!used[i])
	dfs1(i);

	order.push_back(ver);
}

void dfs2(int ver)
{
	used[ver] = true;
	for (auto i: rev_adj[ver])
	if (!used[i])
	dfs2(i);
}

void solve()
{
	for (int i = 1; i <= n; i++)
	for (int j = 1; j <= n; j++)
	if (a[i][j] > 0)
	{
		adj[i].push_back(j);
	    rev_adj[j].push_back(i);
	}

	for (int i = 1; i <= n; i++)
	if (!used[i])
	dfs1(i);

	memset(used, false, sizeof(used));
	reverse(order.begin(), order.end());

	int cnt = 0;
	for (auto i: order)
	if (!used[i])
	{
		dfs2(i);
		cnt++;
	}

	if (cnt == 1)
	cout << "YES" << endl;

	else
	cout << "NO" << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	read();
	solve();
}


#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define endl '\n'

using namespace std;

const int maxn = 2003;

int n, m;
int a[maxn][maxn];
void read()
{
	cin >> n >> m;
	for (int i = 1; i <= n; i++)
	for (int j = 1; j <= m; j++)
	cin >> a[i][j];
}

vector <int> adj[maxn];
bool used[maxn];
void dfs(int ver)
{
	used[ver] = true;
	for (auto i: adj[ver])
	if (!used[i])
	dfs(i);
}

void solve()
{
	for (int i = 1; i <= n; i++)
	for (int j = 1; j <= m; j++)
	if (a[i][j] > 0 && i != j)
	{
		adj[i].push_back(j);
		adj[j].push_back(i);
	}

	dfs(1);

	for (int i = 1; i <= n; i++)
	if (!used[i])
	{
		cout << "NO" << endl;
		return;
	}

	cout << "YES" << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	read();
	solve();
}


#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define endl '\n'

using namespace std;

const int maxn = 2003;

int n, m;
int a[maxn][maxn];
void read()
{
	cin >> n >> m;
	for (int i = 1; i <= n; i++)
	for (int j = 1; j <= m; j++)
	cin >> a[i][j];
}

void solve()
{
	bool is = true;
	for (int i = 1; i <= n; i++)
	for (int j = 1; j <= n; j++)
	if (i != j)
	if (a[i][j] == 0 && a[j][i] == 0)
	is = false;

	if (is)
	cout << "YES" << endl;

	else
	cout << "NO" << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	read();
	solve();
}


#include<stdio.h>
#include<vector>
#include<algorithm>
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int num;
	scanf("%d",&num);
	vector<int>vec;
	for(int i=0;i<num;i++)
	{
		int zan;
		scanf("%d",&zan);
		vec.push_back(zan);
	}
	sort(vec.begin(),vec.end());
	int pt=num/2;
	int ans=num;
	for(int i=0;i<num/2;i++)
	{
		for(;;)
		{
			if(vec[i]*2<=vec[pt])
			{
				ans--;
				pt++;
				break;
			}
			else
			{
				pt++;
			}
			if(pt==num)
			{
				break;
			}
		}
		if(pt==num)
		{
			break;
		}
	}
	printf("%d\n",ans);
}


#include <bits/stdc++.h>

using namespace std;

main(){
	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	int n,num;
	cin >> n;
	vector <int> arr;
	for (int i=0;i<n;i++){
		cin >> num;
		arr.push_back(num);
	}
	sort(arr.begin(),arr.end());
	if (n==1){
		cout << "1" << endl;
	}
	else {
		int ans=n,ct=0;
		int children=n/2,parents=n-(n/2);
		for (int j=0;j<children;j++){
			int child=arr[j];
			for (int i=0;i<(parents-ct);i++){
				int par=arr[n/2+ct+i];
				if ((child*2)<=par){
					ct+=(i+1);
					ans-=1;
					break;
				}
			}
		}
		cout << ans << endl;
	}
}


#include <bits/stdc++.h>

using namespace std;

main(){
	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	int n,num;
	cin >> n;
	vector <int> arr;
	for (int i=0;i<n;i++){
		cin >> num;
		arr.push_back(num);
	}
	sort(arr.begin(),arr.end());
	if (n==1){
		cout << "1" << endl;
	}
	else {
		int ans=n,ct=0;
		int children=n/2,parents=n-(n/2);
		for (int j=0;j<children;j++){
			int child=arr[j];
			for (int i=0;i<(parents-ct);i++){
				int par=arr[n/2+ct+i];
				if ((child*2)<=par){
					ct+=(i+1);
					ans-=1;
					break;
				}
				if ((n/2+ct+i+1)==n){
					ct+=(i+1);
				}
			}
		}
		cout << ans << endl;
	}
}


#include <bits/stdc++.h>

using namespace std;

main(){
	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	int n,num;
	cin >> n;
	vector <int> arr;
	for (int i=0;i<n;i++){
		cin >> num;
		arr.push_back(num);
	}
	sort(arr.begin(),arr.end());
	if (n==1){
		cout << "1" << endl;
	}
	else {
		int ans=n,pt=n/2;
		for (int j=0;j<n/2;j++){
			int child=arr[j];
			for (int i=pt;i<n;i++){
				int par=arr[i];
				if ((child*2)<=par){
					ans-=1;
					pt+=1;
					break;
				}
			}
		}
		cout << ans << endl;
	}
}


#include <bits/stdc++.h>

using namespace std;

main(){
	int n,num;
	//cin >> n;
	scanf("%d",&n);
	vector <int> arr;
	for (int i=0;i<n;i++){
		//cin >> num;
		scanf("%d",&num);
		arr.push_back(num);
	}
	sort(arr.begin(),arr.end());
	if (n==1){
		cout << "1" << endl;
	}
	else {
		int ans=n,ct=0;
		int children=n/2,parents=n-(n/2);
		for (int j=0;j<children;j++){
			int child=arr[j];
			for (int i=0;i<(parents-ct);i++){
				int par=arr[n/2+ct+i];
				if ((child*2)<=par){
					ct+=(i+1);
					ans-=1;
					break;
				}
			}
		}
		printf("%d\n",ans);
	}
}


#include<stdio.h>
#include<vector>
#include<algorithm>
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int num;
	//scanf("%d",&num);
	cin >> num;
	vector<int>vec;
	for(int i=0;i<num;i++)
	{
		int zan;
		//scanf("%d",&zan);
		cin >> zan;
		vec.push_back(zan);
	}
	sort(vec.begin(),vec.end());
	int pt=num/2;
	int ans=num;
	for(int i=0;i<num/2;i++)
	{
		for(;;)
		{
			if(vec[i]*2<=vec[pt])
			{
				ans--;
				pt++;
				break;
			}
			else
			{
				pt++;
			}
			if(pt==num)
			{
				break;
			}
		}
		if(pt==num)
		{
			break;
		}
	}
	printf("%d\n",ans);
}


#include <bits/stdc++.h>

using namespace std;

main(){
	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	int n,num;
	cin >> n;
	vector <int> arr;
	for (int i=0;i<n;i++){
		cin >> num;
		arr.push_back(num);
	}
	sort(arr.begin(),arr.end());
	if (n==1){
		cout << "1" << endl;
	}
	else {
		int ans=n,pt=n/2;
		for (int j=0;j<n/2;j++){
			int child=arr[j];
			for (int i=pt;i<n;i++){
				int par=arr[i];
				if ((child*2)<=par){
					ans-=1;
					pt+=1;
					break;
				}
				else{
					pt+=1;
				}
			}
		}
		cout << ans << endl;
	}
}


#include <bits/stdc++.h>

using namespace std;

main(){
	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	int n,num;
	cin >> n;
	vector <int> arr;
	for (int i=0;i<n;i++){
		cin >> num;
		arr.push_back(num);
	}
	sort(arr.begin(),arr.end());
	if (n==1){
		cout << "1" << endl;
	}
	else {
		int ans=n,ct=0;
		int children=n/2,parents=n-(n/2);
		for (int j=0;j<children;j++){
			int child=arr[j];
			for (int i=0;i<(parents-ct);i++){
				int par=arr[n/2+ct+i];
				cout << "child" << child << "par" << par << endl;
				if ((child*2)<=par){
					ct+=(i+1);
					ans-=1;
					break;
				}
				if ((n/2+ct+i+1)==n){
					ct+=(i+1);
				}
			}
		}
		cout << ans << endl;
	}
}


#include <bits/stdc++.h>

using namespace std;

main(){
	int n,num;
	cin >> n;
	vector <int> arr;
	for (int i=0;i<n;i++){
		cin >> num;
		arr.push_back(num);
	}
	sort(arr.begin(),arr.end());
	if (n==1){
		cout << "1" << endl;
	}
	else {
		int ans=n,ct=0;
		int children=n/2,parents=n-(n/2);
		for (int j=0;j<children;j++){
			int child=arr[j];
			for (int i=0;i<(parents-ct);i++){
				int par=arr[n/2+ct+i];
				if ((child*2)<=par){
					ct+=(i+1);
					ans-=1;
					break;
				}
				if ((n/2+ct+i+1)==n){
					ct+=(i+1);
				}
			}
		}
		cout << ans << endl;
	}
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    int arr[50005];

    scanf("%d",&n);
    int start=n-2,end=n-1;
    for(int i =0;i<n;i++){
        scanf("%d",&arr[i]);
    }
    sort(arr,arr+n);
    int count =0;
    while(start!=-1){
        if(arr[start]*2<arr[end]&&arr[start]!=0&&arr[end]!=0)arr[end]=0,arr[start]=0,count++,start--,end--;

        else if(!arr[start]&&!arr[end])start--,end--;

        else if(!arr[start]&&arr[end])start--;

        else if(arr[start]&&!arr[end])end--;

        else if(arr[start]&&arr[end])start--;

    }
    printf("%d",n-count);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
int arr[500005];
int main()
{
    int n;

    scanf("%d",&n);
    int start=n-2,end=n-1;
    for(int i =0;i<n;i++){
        scanf("%d",&arr[i]);
    }
    sort(arr,arr+n);
    int count =0;
    for(int i =n/2-1;i>=0;i--){
        if(arr[i]*2<=arr[end])count++,end--;
        else start--;

    }

    printf("%d",n-count);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    int arr[50005];

    scanf("%d",&n);
    int start=n-2,end=n-1;
    for(int i =0;i<n;i++){
        scanf("%d",&arr[i]);
    }
    sort(arr,arr+n);
    int count =0;
    for(int i =0;i<n;i++){
        printf("%d\n",arr[i]);
    }
    for(int i =n/2-1;i>=0;i--){
        if(arr[i]*2<=arr[end])count++,end--;
        else start--;

    }

    printf("%d",count);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    int arr[50005];

    scanf("%d",&n);
    int start=n-2,end=n-1;
    for(int i =0;i<n;i++){
        scanf("%d",&arr[i]);
    }
    sort(arr,arr+n);
    int count =0;
    while(start!=-1){
        if(arr[start]*2<arr[end])count++,start--,end--;
        else start--;
    }
    printf("%d",n-count);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    int arr[50005];

    scanf("%d",&n);
    int start=n-2,end=n-1;
    for(int i =0;i<n;i++){
        scanf("%d",&arr[i]);
    }
    sort(arr,arr+n);
    int count =0;
    while(start!=-1){
        if(arr[start]*2<=arr[end])arr[end]=0,count++,start--,end--;
        else start--;
    }
    printf("%d",n-count);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    int arr[50005];

    scanf("%d",&n);
    int start=n-2,end=n-1;
    for(int i =0;i<n;i++){
        scanf("%d",&arr[i]);
    }
    sort(arr,arr+n);
    int count =0;
    while(start!=-1){
        if(arr[start]*2<arr[end])arr[end]=0,arr[start]=0,count++,start--,end--;

        else if(!arr[start]&&!arr[end])start--,end--;

        else if(!arr[start]&&arr[end])start--;

        else if(arr[start]&&!arr[end])end--;

        else if(arr[start]&&arr[end])start--;

    }
    printf("%d",n-count);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    int arr[50005];

    scanf("%d",&n);
    int start=n-2,end=n-1;
    for(int i =0;i<n;i++){
        scanf("%d",&arr[i]);
    }
    sort(arr,arr+n);
    int count =0;
    for(int i =n/2-1;i>=0;i--){
        if(arr[i]*2<=arr[end])count++,end--;
        else start--;

    }

    printf("%d",n-count);
    return 0;
}


//https://codeforces.com/contest/372/problem/A
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

const int N = 5e5;
const int SI = 1e5;
int n;
int s[N+1];
ll out = 0;
int main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cin >> n;
    for(int i = 0; i < n; ++i)
    {
        cin >> s[i];
    }
    sort(s, s + n);

    int h = n-1;
    int l = n -1;
    while (h >= 0 && l >= 0)
    {
        while (l >= 0 && s[h]  < 2 * s[l] ) --l;
        if (l < 0) break;
        out += 1;
        --l;
        // cout << out << endl;

        --h;
    }

    cout << n - out  << endl;
    return 0;
}


//https://codeforces.com/contest/372/problem/A
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

const int N = 6e5;
const int SI = 1e5;
ll n;
ll s[N+1];
ll out = 0;
bitset<N+1> vis = 0;
int main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cin >> n;
    if (n == 1)
    {
        cout << 1 << endl;
        return 0;
    }
    for(int i = 0; i < n; ++i)
    {
        cin >> s[i];
    }
    sort(s, s + n);

    int h = n-1;
    int l = n -2;
    out = 0;
    while (h >= 1 && l >= 0)
    {
        if (!vis[h])
        {
            l = min(l, h);
            if (l == h) --l;
            while (l >= 0 && (vis[l] || s[h]  < 2 * s[l]) ) --l;
            if (l < 0) break;

            // cout << l << " " << h << endl;
            out += 1;
            vis[l] = true;
            --l;
        }
            // cout << out << endl;

        --h;
    }

    cout << n - out  << endl;
    return 0;
}


//https://codeforces.com/contest/372/problem/A
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

const int N = 5e5;
const int SI = 1e5;
ll n;
ll s[N+1];
ll out = 0;
bitset<N+1> vis = 0;
int main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cin >> n;
    if (n == 1)
    {
        cout << 1 << endl;
        return 0;
    }
    for(int i = 0; i < n; ++i)
    {
        cin >> s[i];
    }
    sort(s, s + n);

    int h = n/2;
    int l = 0;
    out = 0;
    while (h < n && l < n/2)
    {
        if (!vis[l])
        {
            while (h < n && 2 * s[l] > s[h] ) ++h;
            if (h == n) break;

            // cout << l << " " << h << endl;
            out += 1;
            vis[h] = true;
            ++h;
        }
            // cout << out << endl;

        ++l;
    }

    cout << n - out  << endl;
    return 0;
}


//https://codeforces.com/contest/372/problem/A
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

const int N = 5e5;
const int SI = 1e5;
ll n;
ll s[N+1];
ll out = 0;
bitset<N+1> vis = 0;
int main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cin >> n;
    if (n == 1)
    {
        cout << 1 << endl;
        return 0;
    }
    for(int i = 0; i < n; ++i)
    {
        cin >> s[i];
    }
    sort(s, s + n);

    int h = n-1;
    int l = n -2;
    while (h >= 0 && l >= 0)
    {
        if (!vis[h])
        {
            while (l >= 0 && s[h]  < 2 * s[l] ) --l;
            if (h == l) --l;
            if (l < 0) break;
            out += 1;
            vis[l] = true;
            --l;
        }
            // cout << out << endl;

        --h;
    }

    cout << n - out  << endl;
    return 0;
}


//https://codeforces.com/contest/372/problem/A
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

const int N = 5e5;
const int SI = 1e5;
ll n;
ll s[N+1];
ll out = 0;
bitset<N+1> vis = 0;
int main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cin >> n;
    if (n == 1)
    {
        cout << 1 << endl;
        return 0;
    }
    for(int i = 0; i < n; ++i)
    {
        cin >> s[i];
    }
    sort(s, s + n);

    int h = n-1;
    int l = n -2;
    while (h >= 0 && l >= 0)
    {
        if (!vis[h])
        {
            while (l >= 0 && s[h]  < 2 * s[l] ) --l;
            if (h == l) --l;
            if (l < 0) break;
            out += 1;
            vis[l] = true;
        }
        --l;
            // cout << out << endl;

        --h;
    }

    cout << n - out  << endl;
    return 0;
}


//https://codeforces.com/contest/372/problem/A
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

const int N = 5e5;
const int SI = 1e5;
ll n;
ll s[N+1];
ll out = 0;
bitset<N+1> vis = 0;
int main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cin >> n;
    if (n == 1)
    {
        cout << 1 << endl;
        return 0;
    }
    for(int i = 0; i < n; ++i)
    {
        cin >> s[i];
    }
    sort(s, s + n);

    int h = n-1;
    int l = n -2;
    out = 0;
    while (h >= 1 && l >= 0)
    {
        if (!vis[h])
        {
            l = min(l, h);
            if (l == h) --l;
            while (l >= 0 && s[h]  < 2 * s[l] ) --l;
            if (h == l) --l;
            if (l < 0) break;
            out += 1;
            vis[l] = true;
            --l;
        }
            // cout << out << endl;

        --h;
    }

    cout << n - out - n % 2  << endl;
    return 0;
}


//https://codeforces.com/contest/372/problem/A
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

const int N = 5e5;
const int SI = 1e5;
ll n;
ll s[N+1];
ll out = 0;
bitset<N+1> vis = 0;
int main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cin >> n;
    if (n == 1)
    {
        cout << 1 << endl;
        return 0;
    }
    for(int i = 0; i < n; ++i)
    {
        cin >> s[i];
    }
    sort(s, s + n);

    int h = n-1;
    int l = n -2;
    out = 0;
    while (h >= 1 && l >= 0)
    {
        if (!vis[h])
        {
            l = min(l, h);
            if (l == h) --l;
            while (l >= 0 && s[h]  < 2 * s[l] ) --l;
            if (l < 0) break;

            // cout << l << " " << h << endl;
            out += 1;
            vis[l] = true;
            --l;
        }
            // cout << out << endl;

        --h;
    }

    cout << n - out  << endl;
    return 0;
}


//https://codeforces.com/contest/372/problem/A
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

const int N = 5e5;
const int SI = 1e5;
ll n;
int s[N+1];
ll out = 0;
int main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cin >> n;
    if (n == 1)
    {
        cout << 1 << endl;
        return 0;
    }
    for(int i = 0; i < n; ++i)
    {
        cin >> s[i];
    }
    sort(s, s + n);

    int h = n-1;
    int l = n -2;
    while (h >= 0 && l >= 0)
    {
        while (l >= 0 && s[h]  < 2 * s[l] ) --l;
        if (l < 0) break;
        out += 1;
        --l;
        // cout << out << endl;

        --h;
    }

    cout << n - out  << endl;
    return 0;
}


//https://codeforces.com/contest/372/problem/A
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

const int N = 5e5;
const int SI = 1e5;
ll n;
ll s[N+1];
ll out = 0;
bitset<N+1> vis = 0;
int main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cin >> n;
    if (n == 1)
    {
        cout << 1 << endl;
        return 0;
    }
    for(int i = 0; i < n; ++i)
    {
        cin >> s[i];
    }
    sort(s, s + n);

    int h = n-1;
    int l = n -2;
    while (h >= 0 && l >= 0)
    {
        if (!vis[h])
        {
            l = min(l, h);
            while (l >= 0 && s[h]  < 2 * s[l] ) --l;
            if (h == l) --l;
            if (l < 0) break;
            out += 1;
            vis[l] = true;
            --l;
        }
            // cout << out << endl;

        --h;
    }

    cout << n - out  << endl;
    return 0;
}


//https://codeforces.com/contest/372/problem/A
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

const int N = 5e5;
const int SI = 1e5;
ll n;
ll s[N+1];
ll out = 0;
bitset<N+1> vis = 0;
int main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cin >> n;
    if (n == 1)
    {
        cout << 1 << endl;
        return 0;
    }
    for(int i = 0; i < n; ++i)
    {
        cin >> s[i];
    }
    sort(s, s + n);

    int h = n-1;
    int l = n -2;
    while (h >= 0 && l >= 0)
    {
        if (!vis[h])
        {
            while (l >= 0 && s[h]  < 2 * s[l] ) --l;
            if (h == l) --l;
            if (l < 0) break;
            out += 1;
            vis[l] = true;
            --l;
            // cout << out << endl;

            --h;
        }
    }

    cout << n - out  << endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n,a[500001];
main(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+1+n);
    int num=n/2;
    int ans=n;
    for(int i=1;i<=n;i++){
        while(1){
            if(a[i]*2<=a[num]){
                num++;
                ans--;
                break;
            }
            else num++;
            if(num>n) break;
        }
        if(num>n) break;
    }
    cout<<ans';
}


#include<bits/stdc++.h>
using namespace std;
int n,a[500001];
main(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+1+n);
    int num=n/2+(n&1);
    int ans=n;
    for(int i=1;i<=n;i++){
        while(1){
            if(a[i]*2<=a[num]){
                num++;
                ans--;
                break;
            }
            else num++;
            if(num>n) break;
        }
        if(num>n) break;
    }
    cout<<ans;
}


#include<bits/stdc++.h>
using namespace std;
int n,a[500001],cnt;
bool used[500001];
main(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+1+n);
    for(int i=n;i>=1;i--){
        if(!used[i]){
            int id=lower_bound(a+1,a+1+n,a[i]/2)-a;
            while(used[id]){
                id--;
            }
            if(!used[id] && id<=n && id>=1){
                cnt++;
                used[i]=true;
                used[id]=true;
                //cout<<i<<' '<<id<<'\n';
            }
        }
    }
    cout<<n-cnt;
}


#include<bits/stdc++.h>
using namespace std;
int n,a[500001];
main(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+1+n);
    int num=n/2;
    int ans=n;
    for(int i=1;i<=n;i++){
        while(1){
            if(a[i]*2<=a[num]){
                num++;
                ans--;
                break;
            }
            else num++;
            if(num>n) break;
        }
        if(num>n) break;
    }
    cout<<ans;
}


#include<bits/stdc++.h>
using namespace std;
int n,a[500001];
main(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+1+n);
    int num=n/2;
    int ans=n;
    for(int i=1;i<=n/2;i++){
        while(1){
            if(a[i]*2<=a[num]){
                num++;
                ans--;
                break;
            }
            else num++;
            if(num>n) break;
        }
        if(num>n) break;
    }
    cout<<ans;
}


#include<bits/stdc++.h>
using namespace std;
int n,a[500001];
main(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+1+n);
    int num=n/2-1;
    int ans=n;
    for(int i=1;i<=n;i++){
        while(1){
            if(a[i]*2<=a[num]){
                num++;
                ans--;
                break;
            }
            else num++;
            if(num>n) break;
        }
        if(num>n) break;
    }
    cout<<ans;
}


#include<bits/stdc++.h>
using namespace std;
int n,a[500001],cnt;
bool used[500001];
main(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+1+n);
    for(int i=n;i>=1;i--){
        if(!used[i]){
            int id=lower_bound(a+1,a+1+n,a[i]/2+(a[i]&1))-a;
            while((used[id] || a[i]/2>=a[id])&& id>=1){
                id--;
            }
            if(!used[id] && id<=n && id>=1){
                cnt++;
                used[i]=true;
                used[id]=true;
                //cout<<i<<' '<<id<<'\n';
            }
        }
    }
    cout<<n-cnt;
}


#include<bits/stdc++.h>
using namespace std;
int n,a[500001];
main(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+1+n);
    int num=n/2+!(n&1);
    int ans=n;
    for(int i=1;i<=n;i++){
        while(1){
            if(a[i]*2<=a[num]){
                num++;
                ans--;
                break;
            }
            else num++;
            if(num>n) break;
        }
        if(num>n) break;
    }
    cout<<ans;
}


//In The Name Of GOD
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 5e5 + 15;
int n;
bool mark[MAXN];
int a[MAXN];

int32_t main() {
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	sort(a, a + n);
	int p = (n >> 1);
	int ans = n;
	for (int i = i; i < (n >> 1); i++) {
		if (a[p] >= a[i] * 2)
		    ans--;
	}
	return cout << ans << '\n', false;
}


//In The Name Of GOD
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 5e5 + 15;
int n;
bool mark[MAXN];
int a[MAXN];

int32_t main() {
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	sort(a, a + n);
	int p = (n >> 1);
	int ans = n;
	for (int i = 0; i < (n >> 1); i++) {
		if (a[p] >= a[i] * 2)
		    ans--, p++;
	}
	return cout << ans << '\n', false;
}


//In The Name Of GOD
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 5e5 + 15;
int n;
bool mark[MAXN];
int a[MAXN];

int32_t main() {
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	sort(a, a + n);
	int p = n - 1;
	int ans = n;
	for (int i = n - 1; ~i; i--) {
		if (p >= 0 && a[p] >= a[i] * 2)
			ans--, p--, mark[i] = true, mark[p] = true;
		while (p >= 0 && mark[p])
			p--;
	}
	return cout << ans << '\n', false;
}


//In The Name Of GOD
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 5e5 + 15;
int n;
bool mark[MAXN];
int a[MAXN];

int32_t main() {
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	sort(a, a + n);
	int p = n - 1;
	int ans = n;
	for (int i = n - 1; ~i; i--) {
		if (p >= 0 && a[p] >= a[i] * 2)
			ans--, mark[i] = true, mark[p] = true;
		while (p >= 0 && mark[p])
			p--;
	}
	return cout << ans << '\n', false;
}


//In The Name Of GOD
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 5e5 + 15;
int n;
int a[MAXN];

int32_t main() {
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	sort(a, a + n);
	int p = n - 1;
	int ans = n;
	for (int i = (n >> 1) - 1; ~i; i--) {
		if (a[p] >= a[i] * 2)
		    ans--, p--;
	}
	return cout << ans << '\n', false;
}


//In The Name Of GOD
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 5e5 + 15;
int n;
bool mark[MAXN];
int a[MAXN];

int32_t main() {
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	sort(a, a + n);
	int p = (n >> 1);
	int ans = n;
	for (int i = 0; i < (n >> 1); i++) {
		if (a[p] >= a[i] * 2)
		    ans--;
	}
	return cout << ans << '\n', false;
}


//In The Name Of GOD
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 5e5 + 15;
int n;
int a[MAXN];

int32_t main() {
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	sort(a, a + n);
	int p = n - 1;
	int ans = n;
	for (int i = n - 1; ~i; i--)
		if (p >= 0 && a[p] >= a[i] * 2)
			ans--, p--;
	return cout << ans << '\n', false;
}


//In The Name Of GOD
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 1e6 + 15;
int n;
int a[MAXN];

int32_t main() {
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	sort(a, a + n);
	int ans = 0;
	for (int i = 0; i < n; i++)
		if (a[i] * 2 > a[n - 1])
			ans++;
	return cout << ans << '\n', false;
}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   ll k=1;
   f1
   {

       for(ll j=k+1;j<n;j++)
       {
           if(b[a[j]]){
           if(2*a[i]<=a[j]){
                c++;
               b[a[j]]=0;
              // cout<<a[j]<<" ";
              k=j;
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,n/2);
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   ll k=1;
   f1
   {

       for(ll j=k;j<n;j++)
       {
           if(b[a[j]]){
           if(2*a[i]<=a[j]){
                c++;
               b[a[j]]=0;
              // cout<<a[j]<<" ";
              k=j;
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,n/2);
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   ll k=0;
   f1
   {

       for(ll j=k+1;j<n;j++)
       {
           if(b[a[j]]){
           if(2*a[i]<=a[j]){
                c++;
               b[j]--;
              // cout<<a[j]<<" ";
              k=j;
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,(n/2));
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);
   ll c=0;
   f1
   {
       for(ll j=i+1;j<n;j++)
       {
           if(a[j]){
           if(a[i]*a[i]<=a[j]){
                c++;
            a[j]--;
            break;
           }

           }
       }

       if(a[i]*a[i]>a[n-1])
       {
           break;
       }
   }
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   ll k=0;
   f1
   {

       for(ll j=k+1;j<n;j++)
       {
           if(b[a[j]]){
           if(2*a[i]<=a[j]){
                c++;
               b[a[j]]--;
              // cout<<a[j]<<" ";
              k=j;
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,(n/2));
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[1000005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   ll k=0;
   f1
   {

       for(ll j=k+1;j<n;j++)
       {
           if(b[j]){
           if(2*a[i]<=a[j]){
                c++;
               b[j]--;
              // cout<<a[j]<<" ";
              k=j;
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,(n/2));
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[1000005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=n;
   ll k=n/2;
   f1
   {

       while(1)
       {

           if(2*a[i]<=a[k]){
                c--;
                k++;

            break;
           }
           else k++;

           if(n==k)break;

       }

       if(n==k)
       {
           break;
       }
   }//cout<<endl;

   cout<<c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   ll k=1;
   f1
   {

       for(ll j=k+1;j<n;j++)
       {
           if(b[a[j]]){
           if(2*a[i]<=a[j]){
                c++;
               b[a[j]]--;
              // cout<<a[j]<<" ";
              k=j;
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,n/2);
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
   ll c=0;
   f1
   {
       for(ll j=i+1;j<n;j++)
       {
           if(b[a[j]]){
           if(a[i]+a[i]<=a[j]){
                c++;
               b[a[j]]--;
            break;
           }

           }
       }

       if(a[i]+a[i]>a[n-1])
       {
           break;
       }
   }
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[1000005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=n;
   ll k=n/2;
   for(ll i=0;i<n/2;i++)
   {

       while(1)
       {

           if(2*a[i]<=a[k]){
                c--;
                k++;

            break;
           }
           else k++;

           if(n==k)break;

       }

       if(n==k)
       {
           break;
       }
   }//cout<<endl;

   cout<<c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[1000005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   ll k=0;
   f1
   {

       for(ll j=k+1;j<n;j++)
       {
           if(b[a[j]]){
           if(2*a[i]<=a[j]){
                c++;
               b[j]--;
              // cout<<a[j]<<" ";
              k=j;
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,(n/2));
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   ll k=0;
   f1
   {

       for(ll j=k;j<n;j++)
       {
           if(b[a[j]]){
           if(2*a[i]<=a[j]){
                c++;
               b[a[j]]--;
              // cout<<a[j]<<" ";
              k=j;
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,(n/2));
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[1000005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   ll k=0;
   f1
   {

       for(ll j=k+1;j<n;j++)
       {
           if(b[j]){
           if(2*a[i]<=a[j]){
                c++;
               b[j]=0;
              // cout<<a[j]<<" ";
              k=j;
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,(n/2));
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   f1
   {
       for(ll j=i+1;j<n;j++)
       {
           if(b[a[j]]){
           if(2*a[i]<=a[j]){
                c++;
               b[a[j]]--;
              // cout<<a[j]<<" ";
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,n/2);
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
   ll c=0;
   f1
   {
       for(ll j=i+1;j<n;j++)
       {
           if(a[j]){
           if(a[i]+a[i]<=a[j]){
                c++;
            a[j]--;
            break;
           }

           }
       }

       if(a[i]+a[i]>a[n-1])
       {
           break;
       }
   }
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   ll k=1;
   f1
   {

       for(ll j=k;j<n;j++)
       {
           if(b[a[j]]){
           if(2*a[i]<=a[j]){
                c++;
               b[a[j]]--;
              // cout<<a[j]<<" ";
              k=j;
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,n/2);
   cout<<n-c;

}


#include<bits/stdc++.h>
#define ll long long
#define f1 for(ll i=0;i<n;i++)
using namespace std;
ll b[100005];
int main()
{
    ll n;
    cin>>n;
   ll a[n+5];
   f1
   {
       cin>>a[i];
       b[a[i]]++;
   }
   sort(a,a+n);

   //f1{cout<<a[i]<<" ";}
  // cout<<endl;
   ll c=0;
   ll k=0;
   f1
   {

       for(ll j=k+1;j<n;j++)
       {
           if(b[a[j]]){
           if(2*a[i]<=a[j]){
                c++;
               b[a[j]]--;
              // cout<<a[j]<<" ";
              k=j;
            break;
           }

           }
       }

       if(a[i]+a[i]>=a[n-1])
       {
           break;
       }
   }//cout<<endl;
   c=min(c,n/2);
   cout<<n-c;

}


#include<set>
#include<map>
#include<list>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<complex>
#include<sstream>
#include<iostream>
#include<fstream>
#include<algorithm>
#include<numeric>
#include<utility>
#include<functional>
#include<stdio.h>
#include<assert.h>
#include<memory.h>
#include<bitset>
#include<stdio.h>
#include <cstdio>
#include <cstring>
#include <string>

using namespace std;

#define ld long double
#define ll long long
#define ff first
#define ss second
#define sz(a) (int)a.size()
#define mem(a, b) memset((a), (b), sizeof(a))
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define pii pair<int ,int >
#define pll pair<ll ,ll >
#define mp make_pair
#define vi vector<int >
#define vii vector<pii>
#define vvi vector < vi >
#define vll vector < ll >
#define vllll vector < pll >
#define vvll vector < vll >
#define forn(i,n) for(int i=0;i<(n);i++)
#define fori(i,s,e) for(int i=s,i<n;i++)
#define qi  queue <int >
#define qll  queue <ll >
#define in_r(x,y,n,m) (x>=0 && x<n && y>=0 && y<m)
#define maxn 100009

ll MOD = 1e9+7;
const double EPS = (1e-8);
const int OO = (int) 1e9 + 7;
const ll OOO = (ll) 1e15 + 7;
double const PI = 3.1415926535897932384626433832795;
const ll mxn = 1000009;
char c1, c2, c3, c4;
string s, s1, s2, s3;
ll n, m, k, t,q , a,  b, c, d, e, f, x , y , z, sol = 0, sum = 0;

ll ar[mxn];

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	cin >> n;
	//cout << n / 2;
	for (int i = 0; i < n; i++) cin >> ar[i];

	sort(ar, ar + n);
	ar[n] = 100000;
	x =n/2;

	sol = 0;
	y = n - 1;
	while (x >= 0){
		if (ar[x] * 2 > ar[y]) x--;
		else sol++, y--, x--;
	}
	cout << sol;
	//cout <<max(n/2, n - sol);

	cout << "\n\n";
	return 0;
}


#include<set>
#include<map>
#include<list>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<complex>
#include<sstream>
#include<iostream>
#include<fstream>
#include<algorithm>
#include<numeric>
#include<utility>
#include<functional>
#include<stdio.h>
#include<assert.h>
#include<memory.h>
#include<bitset>
#include<stdio.h>
#include <cstdio>
#include <cstring>
#include <string>

using namespace std;

#define ld long double
#define ll long long
#define ff first
#define ss second
#define sz(a) (int)a.size()
#define mem(a, b) memset((a), (b), sizeof(a))
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define pii pair<int ,int >
#define pll pair<ll ,ll >
#define mp make_pair
#define vi vector<int >
#define vii vector<pii>
#define vvi vector < vi >
#define vll vector < ll >
#define vllll vector < pll >
#define vvll vector < vll >
#define forn(i,n) for(int i=0;i<(n);i++)
#define fori(i,s,e) for(int i=s,i<n;i++)
#define qi  queue <int >
#define qll  queue <ll >
#define in_r(x,y,n,m) (x>=0 && x<n && y>=0 && y<m)
#define maxn 100009

ll MOD = 1e9+7;
const double EPS = (1e-8);
const int OO = (int) 1e9 + 7;
const ll OOO = (ll) 1e15 + 7;
double const PI = 3.1415926535897932384626433832795;
const ll mxn = 1000009;
char c1, c2, c3, c4;
string s, s1, s2, s3;
ll n, m, k, t,q , a,  b, c, d, e, f, x , y , z, sol = 0, sum = 0;

ll ar[mxn];

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

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

	sort(ar, ar + n);
	ar[n] = 100000;
	x =n/2;

	sol = 0;
	y = n - 1;
	while (x >= 0){
		if (ar[x] * 2 > ar[y]) x--;
		else sol++, y--, x--;
	}

	cout <<max((n+1)/2, n - sol);

	cout << "\n\n";
	return 0;
}


#include<set>
#include<map>
#include<list>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<complex>
#include<sstream>
#include<iostream>
#include<fstream>
#include<algorithm>
#include<numeric>
#include<utility>
#include<functional>
#include<stdio.h>
#include<assert.h>
#include<memory.h>
#include<bitset>
#include<stdio.h>
#include <cstdio>
#include <cstring>
#include <string>

using namespace std;

#define ld long double
#define ll long long
#define ff first
#define ss second
#define sz(a) (int)a.size()
#define mem(a, b) memset((a), (b), sizeof(a))
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define pii pair<int ,int >
#define pll pair<ll ,ll >
#define mp make_pair
#define vi vector<int >
#define vii vector<pii>
#define vvi vector < vi >
#define vll vector < ll >
#define vllll vector < pll >
#define vvll vector < vll >
#define forn(i,n) for(int i=0;i<(n);i++)
#define fori(i,s,e) for(int i=s,i<n;i++)
#define qi  queue <int >
#define qll  queue <ll >
#define in_r(x,y,n,m) (x>=0 && x<n && y>=0 && y<m)
#define maxn 100009

ll MOD = 1e9+7;
const double EPS = (1e-8);
const int OO = (int) 1e9 + 7;
const ll OOO = (ll) 1e15 + 7;
double const PI = 3.1415926535897932384626433832795;
const ll mxn = 100009;
char c1, c2, c3, c4;
string s, s1, s2, s3;
ll n, m, k, t,q , a,  b, c, d, e, f, x , y , z, sol = 0, sum = 0;

ll ar[mxn];

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

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

	sort(ar, ar + n);
	ar[n] = 100000;
	x = lower_bound(ar, ar + n, ar[n - 1] / 2) - ar;

	if (x >= n-1) return cout << n, 0;

	sol = 0;
	y = n - 1;
	while (x >= 0){
		if (ar[x] * 2 > ar[y]) x--;
		else sol++, y--, x--;
	}

	cout << n - sol;

	cout << "\n\n";
	return 0;
}


#include<set>
#include<map>
#include<list>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<complex>
#include<sstream>
#include<iostream>
#include<fstream>
#include<algorithm>
#include<numeric>
#include<utility>
#include<functional>
#include<stdio.h>
#include<assert.h>
#include<memory.h>
#include<bitset>
#include<stdio.h>
#include <cstdio>
#include <cstring>
#include <string>

using namespace std;

#define ld long double
#define ll long long
#define ff first
#define ss second
#define sz(a) (int)a.size()
#define mem(a, b) memset((a), (b), sizeof(a))
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define pii pair<int ,int >
#define pll pair<ll ,ll >
#define mp make_pair
#define vi vector<int >
#define vii vector<pii>
#define vvi vector < vi >
#define vll vector < ll >
#define vllll vector < pll >
#define vvll vector < vll >
#define forn(i,n) for(int i=0;i<(n);i++)
#define fori(i,s,e) for(int i=s,i<n;i++)
#define qi  queue <int >
#define qll  queue <ll >
#define in_r(x,y,n,m) (x>=0 && x<n && y>=0 && y<m)
#define maxn 100009

ll MOD = 1e9+7;
const double EPS = (1e-8);
const int OO = (int) 1e9 + 7;
const ll OOO = (ll) 1e15 + 7;
double const PI = 3.1415926535897932384626433832795;
const ll mxn = 100009;
char c1, c2, c3, c4;
string s, s1, s2, s3;
ll n, m, k, t,q , a,  b, c, d, e, f, x , y , z, sol = 0, sum = 0;

ll ar[mxn];

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

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

	sort(ar, ar + n);
	ar[n] = 100000;
	x = lower_bound(ar, ar + n, ar[n - 1] / 2) - ar;

	if (x >= n-1) return cout << n, 0;

	sol = 0;
	y = n - 1;
	while (x >= 0){
		if (ar[x] * 2 > ar[y]) x--;
		else sol++, y--, x--;
	}

	cout <<max(n/2, n - sol);

	cout << "\n\n";
	return 0;
}


#include<set>
#include<map>
#include<list>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<complex>
#include<sstream>
#include<iostream>
#include<fstream>
#include<algorithm>
#include<numeric>
#include<utility>
#include<functional>
#include<stdio.h>
#include<assert.h>
#include<memory.h>
#include<bitset>
#include<stdio.h>
#include <cstdio>
#include <cstring>
#include <string>

using namespace std;

#define ld long double
#define ll long long
#define ff first
#define ss second
#define sz(a) (int)a.size()
#define mem(a, b) memset((a), (b), sizeof(a))
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define pii pair<int ,int >
#define pll pair<ll ,ll >
#define mp make_pair
#define vi vector<int >
#define vii vector<pii>
#define vvi vector < vi >
#define vll vector < ll >
#define vllll vector < pll >
#define vvll vector < vll >
#define forn(i,n) for(int i=0;i<(n);i++)
#define fori(i,s,e) for(int i=s,i<n;i++)
#define qi  queue <int >
#define qll  queue <ll >
#define in_r(x,y,n,m) (x>=0 && x<n && y>=0 && y<m)
#define maxn 100009

ll MOD = 1e9+7;
const double EPS = (1e-8);
const int OO = (int) 1e9 + 7;
const ll OOO = (ll) 1e15 + 7;
double const PI = 3.1415926535897932384626433832795;
const ll mxn = 1000009;
char c1, c2, c3, c4;
string s, s1, s2, s3;
ll n, m, k, t,q , a,  b, c, d, e, f, x , y , z, sol = 0, sum = 0;

ll ar[mxn];

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	cin >> n;
	//cout << n / 2;
	for (int i = 0; i < n; i++) cin >> ar[i];

	sort(ar, ar + n);
	ar[n] = 100000;
	x =n/2;

	sol = 0;
	y = n - 1;
	while (x >= 0){
		if (ar[x] * 2 > ar[y]) x--;
		else sol++, y--, x--;
	}
	cout << n-sol;
	//cout <<max(n/2, n - sol);

	cout << "\n\n";
	return 0;
}


#include<set>
#include<map>
#include<list>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<complex>
#include<sstream>
#include<iostream>
#include<fstream>
#include<algorithm>
#include<numeric>
#include<utility>
#include<functional>
#include<stdio.h>
#include<assert.h>
#include<memory.h>
#include<bitset>
#include<stdio.h>
#include <cstdio>
#include <cstring>
#include <string>

using namespace std;

#define ld long double
#define ll long long
#define ff first
#define ss second
#define sz(a) (int)a.size()
#define mem(a, b) memset((a), (b), sizeof(a))
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define pii pair<int ,int >
#define pll pair<ll ,ll >
#define mp make_pair
#define vi vector<int >
#define vii vector<pii>
#define vvi vector < vi >
#define vll vector < ll >
#define vllll vector < pll >
#define vvll vector < vll >
#define forn(i,n) for(int i=0;i<(n);i++)
#define fori(i,s,e) for(int i=s,i<n;i++)
#define qi  queue <int >
#define qll  queue <ll >
#define in_r(x,y,n,m) (x>=0 && x<n && y>=0 && y<m)
#define maxn 100009

ll MOD = 1e9+7;
const double EPS = (1e-8);
const int OO = (int) 1e9 + 7;
const ll OOO = (ll) 1e15 + 7;
double const PI = 3.1415926535897932384626433832795;
const ll mxn = 1000009;
char c1, c2, c3, c4;
string s, s1, s2, s3;
ll n, m, k, t,q , a,  b, c, d, e, f, x , y , z, sol = 0, sum = 0;

ll ar[mxn];

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

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

	sort(ar, ar + n);
	ar[n] = 100000;
	x = lower_bound(ar, ar + n, ar[n - 1] / 2) - ar;

	if (x >= n-1) return cout << n, 0;

	sol = 0;
	y = n - 1;
	while (x >= 0){
		if (ar[x] * 2 > ar[y]) x--;
		else sol++, y--, x--;
	}

	cout <<max(n/2, n - sol);

	cout << "\n\n";
	return 0;
}


#include<set>
#include<map>
#include<list>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<complex>
#include<sstream>
#include<iostream>
#include<fstream>
#include<algorithm>
#include<numeric>
#include<utility>
#include<functional>
#include<stdio.h>
#include<assert.h>
#include<memory.h>
#include<bitset>
#include<stdio.h>
#include <cstdio>
#include <cstring>
#include <string>

using namespace std;

#define ld long double
#define ll long long
#define ff first
#define ss second
#define sz(a) (int)a.size()
#define mem(a, b) memset((a), (b), sizeof(a))
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define pii pair<int ,int >
#define pll pair<ll ,ll >
#define mp make_pair
#define vi vector<int >
#define vii vector<pii>
#define vvi vector < vi >
#define vll vector < ll >
#define vllll vector < pll >
#define vvll vector < vll >
#define forn(i,n) for(int i=0;i<(n);i++)
#define fori(i,s,e) for(int i=s,i<n;i++)
#define qi  queue <int >
#define qll  queue <ll >
#define in_r(x,y,n,m) (x>=0 && x<n && y>=0 && y<m)
#define maxn 100009

ll MOD = 1e9+7;
const double EPS = (1e-8);
const int OO = (int) 1e9 + 7;
const ll OOO = (ll) 1e15 + 7;
double const PI = 3.1415926535897932384626433832795;
const ll mxn = 1000009;
char c1, c2, c3, c4;
string s, s1, s2, s3;
ll n, m, k, t,q , a,  b, c, d, e, f, x , y , z, sol = 0, sum = 0;

ll ar[mxn];

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

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

	sort(ar, ar + n);
	ar[n] = 100000;
	x =n/2;

	sol = 0;
	y = n - 1;
	while (x >= 0){
		if (ar[x] * 2 > ar[y]) x--;
		else sol++, y--, x--;
	}

	cout <<max(n/2, n - sol);

	cout << "\n\n";
	return 0;
}


/*
    Author :
    cf : naimish-singh
    cc : naimish_singh
*/

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

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int SIZE = 100005;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ll MOD = 1E9 + 7;
const double EPS = 1e-9;
#define rep(i,n) for (long long i=0;i<(n);++i)
#define repp(i,a,b) for (long long i=(a);i<(b);++i)
#define per(i,x) for(long long i = (x) ; i >= 0 ; --i)
#define perr(i,x,y) for(long long i = (x) ; i >= (y) ; --i)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define init(a,n) (a).resize((n))
#define all(a) (a).begin(),(a).end()
#define lla(a) (a).rbegin(),(a).rend()
#define p(x) cout<<x<<" "
#define pn(x) cout<<x<<"\n"
#define p2(x,y) cout<<x<<" "<<y<<"\n"
#define p3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define p4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<"\n"
#define p5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<"\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(0)

//template<class T>
//bool isPrime(T n){
//    if(n==1)return false;
//    T i = 2;
//    while(i*i<=n){
//       if(n%i==0)return false;
//       i+=1;
//    }
//    return true;
//}
//
//__int128 mpow(ll a, ll b, ll m){
//    if(!b)return 1;
//    if(b&1){
//        return ((__int128)a*mpow(a,b-1,m))%m;
//    }else{
//        __int128 v = mpow(a,b/2,m);
//        return (v*v)%m;
//    }
//}
//
//bool isPrime(ll n){
//    //Efficient algo for primality test
//    //upto 1E18 in 1 second.
//    if(n<=2)return false;
//    for(ll i=2;i*i*i<=n;++i){
//        if(n%i==0)return false;
//    }
//    for(int it=0;it<1E5;++it){
//        ll i = rand()%(n-1)+1;
//        if(__gcd(i,n)!=1)return false;
//        if(mpow(i,n-1,n)!=1)return false;
//    }
//    return true;
//}
// bool prime[100005];
// void seive()
// {
//     memset(prime,true,sizeof(prime));
//     prime[0]=0;
//     prime[1]=0;
//     for(ll p=2;p*p<=100000;p++)
//     {
//         if(prime[p]==true)
//         {
//             for(ll i=p*2;i<=100000;i+=p)
//             prime[i]=false;
//         }
//     }

// }
// ll power(ll n,ll k, ll mod){
//     if(k==0)
//         return 1;
//     if(k==1)
//         return n%mod;

//     ll get=power(n,k/2,mod);
//     ll ret = ((get%mod)*(get%mod))%mod;

//     if(k%2)
//         ret = ((ret%mod)*(n%mod))%mod;

//     return ret%mod;
// }
// string stringSum(string s1, string s2){
//     if(s1.size() > s2.size()){
//         swap(s1,s2);
//     }

//     string temp = "";

//     int carry = 0;

//     reverse(all(s1)); reverse(all(s2));

//     for(int i=0;i<s1.size();++i){
//         int x = (s1[i] - '0')+(s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }

//     for(int i=s1.size(); i<s2.size();++i){
//         int x = (s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }
//     if(carry)temp.pb(carry+'0');
//     reverse(all(temp));
//     return temp;
// }
//template < class T > inline T lcm(T a, T b) { return (a * b) / _gcd(a, b); }
//template < class T > inline string toString(T a) {return to_string(a); }  // Convert int to string
//template < class T > inline void toInt(string s, T &x) { stringstream str(s); str >> x;}  // Convert string to int

int main(){
//    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
    FAST;

    int n; cin>>n;
    multiset<int> st;
    vector<int> a(n);
    rep(i,n){
        cin>>a[i];
        st.insert(a[i]);
    }

    sort(lla(a));

    ll count = 0;

    for(int i=0;i<n;++i){
        if(!st.empty() && st.lower_bound(2*a[i]) != st.end()){
            st.erase(st.find(a[i]));
            st.erase(st.lower_bound(2*a[i]));
            ++count;
        }
    }
    pn(n-count);
}


/*
    Author :
    cf : naimish-singh
    cc : naimish_singh
*/

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

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int SIZE = 100005;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ll MOD = 1E9 + 7;
const double EPS = 1e-9;
#define rep(i,n) for (long long i=0;i<(n);++i)
#define repp(i,a,b) for (long long i=(a);i<(b);++i)
#define per(i,x) for(long long i = (x) ; i >= 0 ; --i)
#define perr(i,x,y) for(long long i = (x) ; i >= (y) ; --i)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define init(a,n) (a).resize((n))
#define all(a) (a).begin(),(a).end()
#define lla(a) (a).rbegin(),(a).rend()
#define p(x) cout<<x<<" "
#define pn(x) cout<<x<<"\n"
#define p2(x,y) cout<<x<<" "<<y<<"\n"
#define p3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define p4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<"\n"
#define p5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<"\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(0)

//template<class T>
//bool isPrime(T n){
//    if(n==1)return false;
//    T i = 2;
//    while(i*i<=n){
//       if(n%i==0)return false;
//       i+=1;
//    }
//    return true;
//}
//
//__int128 mpow(ll a, ll b, ll m){
//    if(!b)return 1;
//    if(b&1){
//        return ((__int128)a*mpow(a,b-1,m))%m;
//    }else{
//        __int128 v = mpow(a,b/2,m);
//        return (v*v)%m;
//    }
//}
//
//bool isPrime(ll n){
//    //Efficient algo for primality test
//    //upto 1E18 in 1 second.
//    if(n<=2)return false;
//    for(ll i=2;i*i*i<=n;++i){
//        if(n%i==0)return false;
//    }
//    for(int it=0;it<1E5;++it){
//        ll i = rand()%(n-1)+1;
//        if(__gcd(i,n)!=1)return false;
//        if(mpow(i,n-1,n)!=1)return false;
//    }
//    return true;
//}
// bool prime[100005];
// void seive()
// {
//     memset(prime,true,sizeof(prime));
//     prime[0]=0;
//     prime[1]=0;
//     for(ll p=2;p*p<=100000;p++)
//     {
//         if(prime[p]==true)
//         {
//             for(ll i=p*2;i<=100000;i+=p)
//             prime[i]=false;
//         }
//     }

// }
// ll power(ll n,ll k, ll mod){
//     if(k==0)
//         return 1;
//     if(k==1)
//         return n%mod;

//     ll get=power(n,k/2,mod);
//     ll ret = ((get%mod)*(get%mod))%mod;

//     if(k%2)
//         ret = ((ret%mod)*(n%mod))%mod;

//     return ret%mod;
// }
// string stringSum(string s1, string s2){
//     if(s1.size() > s2.size()){
//         swap(s1,s2);
//     }

//     string temp = "";

//     int carry = 0;

//     reverse(all(s1)); reverse(all(s2));

//     for(int i=0;i<s1.size();++i){
//         int x = (s1[i] - '0')+(s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }

//     for(int i=s1.size(); i<s2.size();++i){
//         int x = (s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }
//     if(carry)temp.pb(carry+'0');
//     reverse(all(temp));
//     return temp;
// }
//template < class T > inline T lcm(T a, T b) { return (a * b) / _gcd(a, b); }
//template < class T > inline string toString(T a) {return to_string(a); }  // Convert int to string
//template < class T > inline void toInt(string s, T &x) { stringstream str(s); str >> x;}  // Convert string to int

int main(){
//    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
    FAST;

    int n; cin>>n;
    multiset<int> st;
    vector<int> a(n);
    rep(i,n){
        cin>>a[i];
        st.insert(a[i]);
    }

    sort(lla(a));

    ll count = 0;

    for(int i=0;i<n;++i){
        if(!st.empty() && st.lower_bound(2*a[i]) != st.end()){
            st.erase(st.find(a[i]));
            st.erase(st.lower_bound(2*a[i]));
            ++count;
        }
    }
    pn(count+st.size());
}


/*
    Author :
    cf : naimish-singh
    cc : naimish_singh
*/

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

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int SIZE = 100005;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ll MOD = 1E9 + 7;
const double EPS = 1e-9;
#define rep(i,n) for (long long i=0;i<(n);++i)
#define repp(i,a,b) for (long long i=(a);i<(b);++i)
#define per(i,x) for(long long i = (x) ; i >= 0 ; --i)
#define perr(i,x,y) for(long long i = (x) ; i >= (y) ; --i)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define init(a,n) (a).resize((n))
#define all(a) (a).begin(),(a).end()
#define lla(a) (a).rbegin(),(a).rend()
#define p(x) cout<<x<<" "
#define pn(x) cout<<x<<"\n"
#define p2(x,y) cout<<x<<" "<<y<<"\n"
#define p3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define p4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<"\n"
#define p5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<"\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(0)

//template<class T>
//bool isPrime(T n){
//    if(n==1)return false;
//    T i = 2;
//    while(i*i<=n){
//       if(n%i==0)return false;
//       i+=1;
//    }
//    return true;
//}
//
//__int128 mpow(ll a, ll b, ll m){
//    if(!b)return 1;
//    if(b&1){
//        return ((__int128)a*mpow(a,b-1,m))%m;
//    }else{
//        __int128 v = mpow(a,b/2,m);
//        return (v*v)%m;
//    }
//}
//
//bool isPrime(ll n){
//    //Efficient algo for primality test
//    //upto 1E18 in 1 second.
//    if(n<=2)return false;
//    for(ll i=2;i*i*i<=n;++i){
//        if(n%i==0)return false;
//    }
//    for(int it=0;it<1E5;++it){
//        ll i = rand()%(n-1)+1;
//        if(__gcd(i,n)!=1)return false;
//        if(mpow(i,n-1,n)!=1)return false;
//    }
//    return true;
//}
// bool prime[100005];
// void seive()
// {
//     memset(prime,true,sizeof(prime));
//     prime[0]=0;
//     prime[1]=0;
//     for(ll p=2;p*p<=100000;p++)
//     {
//         if(prime[p]==true)
//         {
//             for(ll i=p*2;i<=100000;i+=p)
//             prime[i]=false;
//         }
//     }

// }
// ll power(ll n,ll k, ll mod){
//     if(k==0)
//         return 1;
//     if(k==1)
//         return n%mod;

//     ll get=power(n,k/2,mod);
//     ll ret = ((get%mod)*(get%mod))%mod;

//     if(k%2)
//         ret = ((ret%mod)*(n%mod))%mod;

//     return ret%mod;
// }
// string stringSum(string s1, string s2){
//     if(s1.size() > s2.size()){
//         swap(s1,s2);
//     }

//     string temp = "";

//     int carry = 0;

//     reverse(all(s1)); reverse(all(s2));

//     for(int i=0;i<s1.size();++i){
//         int x = (s1[i] - '0')+(s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }

//     for(int i=s1.size(); i<s2.size();++i){
//         int x = (s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }
//     if(carry)temp.pb(carry+'0');
//     reverse(all(temp));
//     return temp;
// }
//template < class T > inline T lcm(T a, T b) { return (a * b) / _gcd(a, b); }
//template < class T > inline string toString(T a) {return to_string(a); }  // Convert int to string
//template < class T > inline void toInt(string s, T &x) { stringstream str(s); str >> x;}  // Convert string to int

int main(){
//    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
    FAST;

    int n; cin>>n;
    multiset<int> st;
    vector<int> a(n);
    rep(i,n){
        cin>>a[i];
        st.insert(a[i]);
    }

    sort(lla(a));

    ll count = 0;

    for(int i=(n/2)-1;i<n;++i){
        if(st.upper_bound(2*a[i]) != st.end()){
            st.erase(st.find(a[i]));
            st.erase(st.find(*st.upper_bound(2*a[i])));
            ++count;
        }
    }
    pn(n-count);
}


/*
    Author :
    cf : naimish-singh
    cc : naimish_singh
*/

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

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int SIZE = 100005;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ll MOD = 1E9 + 7;
const double EPS = 1e-9;
#define rep(i,n) for (long long i=0;i<(n);++i)
#define repp(i,a,b) for (long long i=(a);i<(b);++i)
#define per(i,x) for(long long i = (x) ; i >= 0 ; --i)
#define perr(i,x,y) for(long long i = (x) ; i >= (y) ; --i)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define init(a,n) (a).resize((n))
#define all(a) (a).begin(),(a).end()
#define lla(a) (a).rbegin(),(a).rend()
#define p(x) cout<<x<<" "
#define pn(x) cout<<x<<"\n"
#define p2(x,y) cout<<x<<" "<<y<<"\n"
#define p3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define p4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<"\n"
#define p5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<"\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(0)

//template<class T>
//bool isPrime(T n){
//    if(n==1)return false;
//    T i = 2;
//    while(i*i<=n){
//       if(n%i==0)return false;
//       i+=1;
//    }
//    return true;
//}
//
//__int128 mpow(ll a, ll b, ll m){
//    if(!b)return 1;
//    if(b&1){
//        return ((__int128)a*mpow(a,b-1,m))%m;
//    }else{
//        __int128 v = mpow(a,b/2,m);
//        return (v*v)%m;
//    }
//}
//
//bool isPrime(ll n){
//    //Efficient algo for primality test
//    //upto 1E18 in 1 second.
//    if(n<=2)return false;
//    for(ll i=2;i*i*i<=n;++i){
//        if(n%i==0)return false;
//    }
//    for(int it=0;it<1E5;++it){
//        ll i = rand()%(n-1)+1;
//        if(__gcd(i,n)!=1)return false;
//        if(mpow(i,n-1,n)!=1)return false;
//    }
//    return true;
//}
// bool prime[100005];
// void seive()
// {
//     memset(prime,true,sizeof(prime));
//     prime[0]=0;
//     prime[1]=0;
//     for(ll p=2;p*p<=100000;p++)
//     {
//         if(prime[p]==true)
//         {
//             for(ll i=p*2;i<=100000;i+=p)
//             prime[i]=false;
//         }
//     }

// }
// ll power(ll n,ll k, ll mod){
//     if(k==0)
//         return 1;
//     if(k==1)
//         return n%mod;

//     ll get=power(n,k/2,mod);
//     ll ret = ((get%mod)*(get%mod))%mod;

//     if(k%2)
//         ret = ((ret%mod)*(n%mod))%mod;

//     return ret%mod;
// }
// string stringSum(string s1, string s2){
//     if(s1.size() > s2.size()){
//         swap(s1,s2);
//     }

//     string temp = "";

//     int carry = 0;

//     reverse(all(s1)); reverse(all(s2));

//     for(int i=0;i<s1.size();++i){
//         int x = (s1[i] - '0')+(s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }

//     for(int i=s1.size(); i<s2.size();++i){
//         int x = (s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }
//     if(carry)temp.pb(carry+'0');
//     reverse(all(temp));
//     return temp;
// }
//template < class T > inline T lcm(T a, T b) { return (a * b) / _gcd(a, b); }
//template < class T > inline string toString(T a) {return to_string(a); }  // Convert int to string
//template < class T > inline void toInt(string s, T &x) { stringstream str(s); str >> x;}  // Convert string to int

int main(){
//    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
    FAST;

    int n; cin>>n;
    multiset<int> st;
    vector<int> a(n);
    rep(i,n){
        cin>>a[i];
        st.insert(a[i]);
    }

    sort(lla(a));

    ll count = 0;

    for(int i=(n/2);i<n;++i){
        if(st.upper_bound(2*a[i]-1) != st.end()){
            st.erase(st.find(a[i]));
            st.erase(st.find(*st.upper_bound(2*a[i]-1)));
            ++count;
        }
    }
    pn(n-count);
}


/*
    Author :
    cf : naimish-singh
    cc : naimish_singh
*/

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

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int SIZE = 100005;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ll MOD = 1E9 + 7;
const double EPS = 1e-9;
#define rep(i,n) for (long long i=0;i<(n);++i)
#define repp(i,a,b) for (long long i=(a);i<(b);++i)
#define per(i,x) for(long long i = (x) ; i >= 0 ; --i)
#define perr(i,x,y) for(long long i = (x) ; i >= (y) ; --i)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define init(a,n) (a).resize((n))
#define all(a) (a).begin(),(a).end()
#define lla(a) (a).rbegin(),(a).rend()
#define p(x) cout<<x<<" "
#define pn(x) cout<<x<<"\n"
#define p2(x,y) cout<<x<<" "<<y<<"\n"
#define p3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define p4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<"\n"
#define p5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<"\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(0)

//template<class T>
//bool isPrime(T n){
//    if(n==1)return false;
//    T i = 2;
//    while(i*i<=n){
//       if(n%i==0)return false;
//       i+=1;
//    }
//    return true;
//}
//
//__int128 mpow(ll a, ll b, ll m){
//    if(!b)return 1;
//    if(b&1){
//        return ((__int128)a*mpow(a,b-1,m))%m;
//    }else{
//        __int128 v = mpow(a,b/2,m);
//        return (v*v)%m;
//    }
//}
//
//bool isPrime(ll n){
//    //Efficient algo for primality test
//    //upto 1E18 in 1 second.
//    if(n<=2)return false;
//    for(ll i=2;i*i*i<=n;++i){
//        if(n%i==0)return false;
//    }
//    for(int it=0;it<1E5;++it){
//        ll i = rand()%(n-1)+1;
//        if(__gcd(i,n)!=1)return false;
//        if(mpow(i,n-1,n)!=1)return false;
//    }
//    return true;
//}
// bool prime[100005];
// void seive()
// {
//     memset(prime,true,sizeof(prime));
//     prime[0]=0;
//     prime[1]=0;
//     for(ll p=2;p*p<=100000;p++)
//     {
//         if(prime[p]==true)
//         {
//             for(ll i=p*2;i<=100000;i+=p)
//             prime[i]=false;
//         }
//     }

// }
// ll power(ll n,ll k, ll mod){
//     if(k==0)
//         return 1;
//     if(k==1)
//         return n%mod;

//     ll get=power(n,k/2,mod);
//     ll ret = ((get%mod)*(get%mod))%mod;

//     if(k%2)
//         ret = ((ret%mod)*(n%mod))%mod;

//     return ret%mod;
// }
// string stringSum(string s1, string s2){
//     if(s1.size() > s2.size()){
//         swap(s1,s2);
//     }

//     string temp = "";

//     int carry = 0;

//     reverse(all(s1)); reverse(all(s2));

//     for(int i=0;i<s1.size();++i){
//         int x = (s1[i] - '0')+(s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }

//     for(int i=s1.size(); i<s2.size();++i){
//         int x = (s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }
//     if(carry)temp.pb(carry+'0');
//     reverse(all(temp));
//     return temp;
// }
//template < class T > inline T lcm(T a, T b) { return (a * b) / _gcd(a, b); }
//template < class T > inline string toString(T a) {return to_string(a); }  // Convert int to string
//template < class T > inline void toInt(string s, T &x) { stringstream str(s); str >> x;}  // Convert string to int

int main(){
//    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
    FAST;

    int n; cin>>n;
    multiset<int> st;
    vector<int> a(n);
    rep(i,n){
        cin>>a[i];
        st.insert(a[i]);
    }

    sort(lla(a));

    ll count = 0;

    for(int i=(n/2)-1;i<n;++i){
        if(st.lower_bound(2*a[i]) != st.end()){
            st.erase(st.find(a[i]));
            st.erase(st.find(*st.lower_bound(2*a[i])));
            ++count;
        }
    }
    pn(n-count);
}


/*
    Author :
    cf : naimish-singh
    cc : naimish_singh
*/

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

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int SIZE = 100005;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ll MOD = 1E9 + 7;
const double EPS = 1e-9;
#define rep(i,n) for (long long i=0;i<(n);++i)
#define repp(i,a,b) for (long long i=(a);i<(b);++i)
#define per(i,x) for(long long i = (x) ; i >= 0 ; --i)
#define perr(i,x,y) for(long long i = (x) ; i >= (y) ; --i)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define init(a,n) (a).resize((n))
#define all(a) (a).begin(),(a).end()
#define lla(a) (a).rbegin(),(a).rend()
#define p(x) cout<<x<<" "
#define pn(x) cout<<x<<"\n"
#define p2(x,y) cout<<x<<" "<<y<<"\n"
#define p3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define p4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<"\n"
#define p5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<"\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(0)

//template<class T>
//bool isPrime(T n){
//    if(n==1)return false;
//    T i = 2;
//    while(i*i<=n){
//       if(n%i==0)return false;
//       i+=1;
//    }
//    return true;
//}
//
//__int128 mpow(ll a, ll b, ll m){
//    if(!b)return 1;
//    if(b&1){
//        return ((__int128)a*mpow(a,b-1,m))%m;
//    }else{
//        __int128 v = mpow(a,b/2,m);
//        return (v*v)%m;
//    }
//}
//
//bool isPrime(ll n){
//    //Efficient algo for primality test
//    //upto 1E18 in 1 second.
//    if(n<=2)return false;
//    for(ll i=2;i*i*i<=n;++i){
//        if(n%i==0)return false;
//    }
//    for(int it=0;it<1E5;++it){
//        ll i = rand()%(n-1)+1;
//        if(__gcd(i,n)!=1)return false;
//        if(mpow(i,n-1,n)!=1)return false;
//    }
//    return true;
//}
// bool prime[100005];
// void seive()
// {
//     memset(prime,true,sizeof(prime));
//     prime[0]=0;
//     prime[1]=0;
//     for(ll p=2;p*p<=100000;p++)
//     {
//         if(prime[p]==true)
//         {
//             for(ll i=p*2;i<=100000;i+=p)
//             prime[i]=false;
//         }
//     }

// }
// ll power(ll n,ll k, ll mod){
//     if(k==0)
//         return 1;
//     if(k==1)
//         return n%mod;

//     ll get=power(n,k/2,mod);
//     ll ret = ((get%mod)*(get%mod))%mod;

//     if(k%2)
//         ret = ((ret%mod)*(n%mod))%mod;

//     return ret%mod;
// }
// string stringSum(string s1, string s2){
//     if(s1.size() > s2.size()){
//         swap(s1,s2);
//     }

//     string temp = "";

//     int carry = 0;

//     reverse(all(s1)); reverse(all(s2));

//     for(int i=0;i<s1.size();++i){
//         int x = (s1[i] - '0')+(s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }

//     for(int i=s1.size(); i<s2.size();++i){
//         int x = (s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }
//     if(carry)temp.pb(carry+'0');
//     reverse(all(temp));
//     return temp;
// }
//template < class T > inline T lcm(T a, T b) { return (a * b) / _gcd(a, b); }
//template < class T > inline string toString(T a) {return to_string(a); }  // Convert int to string
//template < class T > inline void toInt(string s, T &x) { stringstream str(s); str >> x;}  // Convert string to int

int main(){
//    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
    FAST;

    int n; cin>>n;
    multiset<int> st;
    vector<int> a(n);
    rep(i,n){
        cin>>a[i];
        st.insert(a[i]);
    }

    sort(lla(a));

    ll count = 0;

    for(int i=0;i<n;++i){
        if(!st.empty() && st.upper_bound(2*a[i]) != st.end()){
            st.erase(st.find(a[i]));
            st.erase(st.lower_bound(2*a[i]));
            ++count;
        }
    }
    pn(n-count);
}


/*
    Author :
    cf : naimish-singh
    cc : naimish_singh
*/

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

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int SIZE = 100005;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ll MOD = 1E9 + 7;
const double EPS = 1e-9;
#define rep(i,n) for (long long i=0;i<(n);++i)
#define repp(i,a,b) for (long long i=(a);i<(b);++i)
#define per(i,x) for(long long i = (x) ; i >= 0 ; --i)
#define perr(i,x,y) for(long long i = (x) ; i >= (y) ; --i)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define init(a,n) (a).resize((n))
#define all(a) (a).begin(),(a).end()
#define lla(a) (a).rbegin(),(a).rend()
#define p(x) cout<<x<<" "
#define pn(x) cout<<x<<"\n"
#define p2(x,y) cout<<x<<" "<<y<<"\n"
#define p3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define p4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<"\n"
#define p5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<"\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(0)

//template<class T>
//bool isPrime(T n){
//    if(n==1)return false;
//    T i = 2;
//    while(i*i<=n){
//       if(n%i==0)return false;
//       i+=1;
//    }
//    return true;
//}
//
//__int128 mpow(ll a, ll b, ll m){
//    if(!b)return 1;
//    if(b&1){
//        return ((__int128)a*mpow(a,b-1,m))%m;
//    }else{
//        __int128 v = mpow(a,b/2,m);
//        return (v*v)%m;
//    }
//}
//
//bool isPrime(ll n){
//    //Efficient algo for primality test
//    //upto 1E18 in 1 second.
//    if(n<=2)return false;
//    for(ll i=2;i*i*i<=n;++i){
//        if(n%i==0)return false;
//    }
//    for(int it=0;it<1E5;++it){
//        ll i = rand()%(n-1)+1;
//        if(__gcd(i,n)!=1)return false;
//        if(mpow(i,n-1,n)!=1)return false;
//    }
//    return true;
//}
// bool prime[100005];
// void seive()
// {
//     memset(prime,true,sizeof(prime));
//     prime[0]=0;
//     prime[1]=0;
//     for(ll p=2;p*p<=100000;p++)
//     {
//         if(prime[p]==true)
//         {
//             for(ll i=p*2;i<=100000;i+=p)
//             prime[i]=false;
//         }
//     }

// }
// ll power(ll n,ll k, ll mod){
//     if(k==0)
//         return 1;
//     if(k==1)
//         return n%mod;

//     ll get=power(n,k/2,mod);
//     ll ret = ((get%mod)*(get%mod))%mod;

//     if(k%2)
//         ret = ((ret%mod)*(n%mod))%mod;

//     return ret%mod;
// }
// string stringSum(string s1, string s2){
//     if(s1.size() > s2.size()){
//         swap(s1,s2);
//     }

//     string temp = "";

//     int carry = 0;

//     reverse(all(s1)); reverse(all(s2));

//     for(int i=0;i<s1.size();++i){
//         int x = (s1[i] - '0')+(s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }

//     for(int i=s1.size(); i<s2.size();++i){
//         int x = (s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }
//     if(carry)temp.pb(carry+'0');
//     reverse(all(temp));
//     return temp;
// }
//template < class T > inline T lcm(T a, T b) { return (a * b) / _gcd(a, b); }
//template < class T > inline string toString(T a) {return to_string(a); }  // Convert int to string
//template < class T > inline void toInt(string s, T &x) { stringstream str(s); str >> x;}  // Convert string to int

int main(){
//    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
    FAST;

    int n; cin>>n;
    multiset<int> st;
    vector<int> a(n);
    rep(i,n){
        cin>>a[i];
        st.insert(a[i]);
    }

    sort(lla(a));

    ll count = 0;

    for(int i=(n/2)-1;i<n;++i){
        if(st.upper_bound(2*a[i]-1) != st.end()){
            st.erase(st.find(a[i]));
            st.erase(st.find(*st.upper_bound(2*a[i]-1)));
            ++count;
        }
    }
    pn(n-count);
}


/*
    Author :
    cf : naimish-singh
    cc : naimish_singh
*/

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

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int SIZE = 100005;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ll MOD = 1E9 + 7;
const double EPS = 1e-9;
#define rep(i,n) for (long long i=0;i<(n);++i)
#define repp(i,a,b) for (long long i=(a);i<(b);++i)
#define per(i,x) for(long long i = (x) ; i >= 0 ; --i)
#define perr(i,x,y) for(long long i = (x) ; i >= (y) ; --i)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define init(a,n) (a).resize((n))
#define all(a) (a).begin(),(a).end()
#define lla(a) (a).rbegin(),(a).rend()
#define p(x) cout<<x<<" "
#define pn(x) cout<<x<<"\n"
#define p2(x,y) cout<<x<<" "<<y<<"\n"
#define p3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define p4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<"\n"
#define p5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<"\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(0)

//template<class T>
//bool isPrime(T n){
//    if(n==1)return false;
//    T i = 2;
//    while(i*i<=n){
//       if(n%i==0)return false;
//       i+=1;
//    }
//    return true;
//}
//
//__int128 mpow(ll a, ll b, ll m){
//    if(!b)return 1;
//    if(b&1){
//        return ((__int128)a*mpow(a,b-1,m))%m;
//    }else{
//        __int128 v = mpow(a,b/2,m);
//        return (v*v)%m;
//    }
//}
//
//bool isPrime(ll n){
//    //Efficient algo for primality test
//    //upto 1E18 in 1 second.
//    if(n<=2)return false;
//    for(ll i=2;i*i*i<=n;++i){
//        if(n%i==0)return false;
//    }
//    for(int it=0;it<1E5;++it){
//        ll i = rand()%(n-1)+1;
//        if(__gcd(i,n)!=1)return false;
//        if(mpow(i,n-1,n)!=1)return false;
//    }
//    return true;
//}
// bool prime[100005];
// void seive()
// {
//     memset(prime,true,sizeof(prime));
//     prime[0]=0;
//     prime[1]=0;
//     for(ll p=2;p*p<=100000;p++)
//     {
//         if(prime[p]==true)
//         {
//             for(ll i=p*2;i<=100000;i+=p)
//             prime[i]=false;
//         }
//     }

// }
// ll power(ll n,ll k, ll mod){
//     if(k==0)
//         return 1;
//     if(k==1)
//         return n%mod;

//     ll get=power(n,k/2,mod);
//     ll ret = ((get%mod)*(get%mod))%mod;

//     if(k%2)
//         ret = ((ret%mod)*(n%mod))%mod;

//     return ret%mod;
// }
// string stringSum(string s1, string s2){
//     if(s1.size() > s2.size()){
//         swap(s1,s2);
//     }

//     string temp = "";

//     int carry = 0;

//     reverse(all(s1)); reverse(all(s2));

//     for(int i=0;i<s1.size();++i){
//         int x = (s1[i] - '0')+(s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }

//     for(int i=s1.size(); i<s2.size();++i){
//         int x = (s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }
//     if(carry)temp.pb(carry+'0');
//     reverse(all(temp));
//     return temp;
// }
//template < class T > inline T lcm(T a, T b) { return (a * b) / _gcd(a, b); }
//template < class T > inline string toString(T a) {return to_string(a); }  // Convert int to string
//template < class T > inline void toInt(string s, T &x) { stringstream str(s); str >> x;}  // Convert string to int

int main(){
//    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
    FAST;

    int n; cin>>n;
    multiset<int> st;
    vector<int> a(n);
    rep(i,n){
        cin>>a[i];
        st.insert(a[i]);
    }

    sort(lla(a));

    ll count = 0;

    for(int i=(n/2)-1;i<n;++i){
        if(!st.empty() && st.lower_bound(2*a[i]) != st.end()){
            st.erase(st.find(a[i]));
            st.erase(st.lower_bound(2*a[i]));
            ++count;
        }
    }
    pn(count+st.size());
}


/*
    Author :
    cf : naimish-singh
    cc : naimish_singh
*/

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

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int SIZE = 100005;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ll MOD = 1E9 + 7;
const double EPS = 1e-9;
#define rep(i,n) for (long long i=0;i<(n);++i)
#define repp(i,a,b) for (long long i=(a);i<(b);++i)
#define per(i,x) for(long long i = (x) ; i >= 0 ; --i)
#define perr(i,x,y) for(long long i = (x) ; i >= (y) ; --i)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define init(a,n) (a).resize((n))
#define all(a) (a).begin(),(a).end()
#define lla(a) (a).rbegin(),(a).rend()
#define p(x) cout<<x<<" "
#define pn(x) cout<<x<<"\n"
#define p2(x,y) cout<<x<<" "<<y<<"\n"
#define p3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define p4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<"\n"
#define p5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<"\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(0)

//template<class T>
//bool isPrime(T n){
//    if(n==1)return false;
//    T i = 2;
//    while(i*i<=n){
//       if(n%i==0)return false;
//       i+=1;
//    }
//    return true;
//}
//
//__int128 mpow(ll a, ll b, ll m){
//    if(!b)return 1;
//    if(b&1){
//        return ((__int128)a*mpow(a,b-1,m))%m;
//    }else{
//        __int128 v = mpow(a,b/2,m);
//        return (v*v)%m;
//    }
//}
//
//bool isPrime(ll n){
//    //Efficient algo for primality test
//    //upto 1E18 in 1 second.
//    if(n<=2)return false;
//    for(ll i=2;i*i*i<=n;++i){
//        if(n%i==0)return false;
//    }
//    for(int it=0;it<1E5;++it){
//        ll i = rand()%(n-1)+1;
//        if(__gcd(i,n)!=1)return false;
//        if(mpow(i,n-1,n)!=1)return false;
//    }
//    return true;
//}
// bool prime[100005];
// void seive()
// {
//     memset(prime,true,sizeof(prime));
//     prime[0]=0;
//     prime[1]=0;
//     for(ll p=2;p*p<=100000;p++)
//     {
//         if(prime[p]==true)
//         {
//             for(ll i=p*2;i<=100000;i+=p)
//             prime[i]=false;
//         }
//     }

// }
// ll power(ll n,ll k, ll mod){
//     if(k==0)
//         return 1;
//     if(k==1)
//         return n%mod;

//     ll get=power(n,k/2,mod);
//     ll ret = ((get%mod)*(get%mod))%mod;

//     if(k%2)
//         ret = ((ret%mod)*(n%mod))%mod;

//     return ret%mod;
// }
// string stringSum(string s1, string s2){
//     if(s1.size() > s2.size()){
//         swap(s1,s2);
//     }

//     string temp = "";

//     int carry = 0;

//     reverse(all(s1)); reverse(all(s2));

//     for(int i=0;i<s1.size();++i){
//         int x = (s1[i] - '0')+(s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }

//     for(int i=s1.size(); i<s2.size();++i){
//         int x = (s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }
//     if(carry)temp.pb(carry+'0');
//     reverse(all(temp));
//     return temp;
// }
//template < class T > inline T lcm(T a, T b) { return (a * b) / _gcd(a, b); }
//template < class T > inline string toString(T a) {return to_string(a); }  // Convert int to string
//template < class T > inline void toInt(string s, T &x) { stringstream str(s); str >> x;}  // Convert string to int

int main(){
//    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
    FAST;

    int n; cin>>n;
    multiset<int> st;
    vector<int> a(n);
    rep(i,n){
        cin>>a[i];
        st.insert(a[i]);
    }

    sort(all(a));

    ll count = 0;

    for(int i=(n/2)-1;i>=0;--i){
        if(st.upper_bound(2*a[i]-1) != st.end()){
            st.erase(st.find(a[i]));
            st.erase(st.find(*st.upper_bound(2*a[i]-1)));
            ++count;
        }
    }
    pn(n-count);
}


/*
    Author :
    cf : naimish-singh
    cc : naimish_singh
*/

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

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int SIZE = 100005;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ll MOD = 1E9 + 7;
const double EPS = 1e-9;
#define rep(i,n) for (long long i=0;i<(n);++i)
#define repp(i,a,b) for (long long i=(a);i<(b);++i)
#define per(i,x) for(long long i = (x) ; i >= 0 ; --i)
#define perr(i,x,y) for(long long i = (x) ; i >= (y) ; --i)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define init(a,n) (a).resize((n))
#define all(a) (a).begin(),(a).end()
#define lla(a) (a).rbegin(),(a).rend()
#define p(x) cout<<x<<" "
#define pn(x) cout<<x<<"\n"
#define p2(x,y) cout<<x<<" "<<y<<"\n"
#define p3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define p4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<"\n"
#define p5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<"\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(0)

//template<class T>
//bool isPrime(T n){
//    if(n==1)return false;
//    T i = 2;
//    while(i*i<=n){
//       if(n%i==0)return false;
//       i+=1;
//    }
//    return true;
//}
//
//__int128 mpow(ll a, ll b, ll m){
//    if(!b)return 1;
//    if(b&1){
//        return ((__int128)a*mpow(a,b-1,m))%m;
//    }else{
//        __int128 v = mpow(a,b/2,m);
//        return (v*v)%m;
//    }
//}
//
//bool isPrime(ll n){
//    //Efficient algo for primality test
//    //upto 1E18 in 1 second.
//    if(n<=2)return false;
//    for(ll i=2;i*i*i<=n;++i){
//        if(n%i==0)return false;
//    }
//    for(int it=0;it<1E5;++it){
//        ll i = rand()%(n-1)+1;
//        if(__gcd(i,n)!=1)return false;
//        if(mpow(i,n-1,n)!=1)return false;
//    }
//    return true;
//}
// bool prime[100005];
// void seive()
// {
//     memset(prime,true,sizeof(prime));
//     prime[0]=0;
//     prime[1]=0;
//     for(ll p=2;p*p<=100000;p++)
//     {
//         if(prime[p]==true)
//         {
//             for(ll i=p*2;i<=100000;i+=p)
//             prime[i]=false;
//         }
//     }

// }
// ll power(ll n,ll k, ll mod){
//     if(k==0)
//         return 1;
//     if(k==1)
//         return n%mod;

//     ll get=power(n,k/2,mod);
//     ll ret = ((get%mod)*(get%mod))%mod;

//     if(k%2)
//         ret = ((ret%mod)*(n%mod))%mod;

//     return ret%mod;
// }
// string stringSum(string s1, string s2){
//     if(s1.size() > s2.size()){
//         swap(s1,s2);
//     }

//     string temp = "";

//     int carry = 0;

//     reverse(all(s1)); reverse(all(s2));

//     for(int i=0;i<s1.size();++i){
//         int x = (s1[i] - '0')+(s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }

//     for(int i=s1.size(); i<s2.size();++i){
//         int x = (s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }
//     if(carry)temp.pb(carry+'0');
//     reverse(all(temp));
//     return temp;
// }
//template < class T > inline T lcm(T a, T b) { return (a * b) / _gcd(a, b); }
//template < class T > inline string toString(T a) {return to_string(a); }  // Convert int to string
//template < class T > inline void toInt(string s, T &x) { stringstream str(s); str >> x;}  // Convert string to int

int main(){
//    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
    FAST;

    int n; cin>>n;
    multiset<int> st;
    vector<int> a(n);
    rep(i,n){
        cin>>a[i];
        st.insert(a[i]);
    }

    sort(lla(a));

    ll count = 0;

    for(int i=(n/2);i<n;++i){
        if(st.lower_bound(2*a[i]) != st.end()){
            st.erase(st.find(a[i]));
            st.erase(st.find(*st.lower_bound(2*a[i])));
            ++count;
        }
    }
    pn(n-count);
}


/*
    Author :
    cf : naimish-singh
    cc : naimish_singh
*/

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

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
const int SIZE = 100005;
const int INF = int (1e9) + int (1e5);
const ll INFL = ll(2e18) + ll(1e10);
const ll MOD = 1E9 + 7;
const double EPS = 1e-9;
#define rep(i,n) for (long long i=0;i<(n);++i)
#define repp(i,a,b) for (long long i=(a);i<(b);++i)
#define per(i,x) for(long long i = (x) ; i >= 0 ; --i)
#define perr(i,x,y) for(long long i = (x) ; i >= (y) ; --i)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define init(a,n) (a).resize((n))
#define all(a) (a).begin(),(a).end()
#define lla(a) (a).rbegin(),(a).rend()
#define p(x) cout<<x<<" "
#define pn(x) cout<<x<<"\n"
#define p2(x,y) cout<<x<<" "<<y<<"\n"
#define p3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n"
#define p4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<"\n"
#define p5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<"\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(0)

//template<class T>
//bool isPrime(T n){
//    if(n==1)return false;
//    T i = 2;
//    while(i*i<=n){
//       if(n%i==0)return false;
//       i+=1;
//    }
//    return true;
//}
//
//__int128 mpow(ll a, ll b, ll m){
//    if(!b)return 1;
//    if(b&1){
//        return ((__int128)a*mpow(a,b-1,m))%m;
//    }else{
//        __int128 v = mpow(a,b/2,m);
//        return (v*v)%m;
//    }
//}
//
//bool isPrime(ll n){
//    //Efficient algo for primality test
//    //upto 1E18 in 1 second.
//    if(n<=2)return false;
//    for(ll i=2;i*i*i<=n;++i){
//        if(n%i==0)return false;
//    }
//    for(int it=0;it<1E5;++it){
//        ll i = rand()%(n-1)+1;
//        if(__gcd(i,n)!=1)return false;
//        if(mpow(i,n-1,n)!=1)return false;
//    }
//    return true;
//}
// bool prime[100005];
// void seive()
// {
//     memset(prime,true,sizeof(prime));
//     prime[0]=0;
//     prime[1]=0;
//     for(ll p=2;p*p<=100000;p++)
//     {
//         if(prime[p]==true)
//         {
//             for(ll i=p*2;i<=100000;i+=p)
//             prime[i]=false;
//         }
//     }

// }
// ll power(ll n,ll k, ll mod){
//     if(k==0)
//         return 1;
//     if(k==1)
//         return n%mod;

//     ll get=power(n,k/2,mod);
//     ll ret = ((get%mod)*(get%mod))%mod;

//     if(k%2)
//         ret = ((ret%mod)*(n%mod))%mod;

//     return ret%mod;
// }
// string stringSum(string s1, string s2){
//     if(s1.size() > s2.size()){
//         swap(s1,s2);
//     }

//     string temp = "";

//     int carry = 0;

//     reverse(all(s1)); reverse(all(s2));

//     for(int i=0;i<s1.size();++i){
//         int x = (s1[i] - '0')+(s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }

//     for(int i=s1.size(); i<s2.size();++i){
//         int x = (s2[i] - '0')+carry;
//         temp.pb(x%10 + '0');
//         carry = x / 10;
//     }
//     if(carry)temp.pb(carry+'0');
//     reverse(all(temp));
//     return temp;
// }
//template < class T > inline T lcm(T a, T b) { return (a * b) / _gcd(a, b); }
//template < class T > inline string toString(T a) {return to_string(a); }  // Convert int to string
//template < class T > inline void toInt(string s, T &x) { stringstream str(s); str >> x;}  // Convert string to int

int main(){
//    freopen("in.txt","r",stdin);
//    freopen("out.txt","w",stdout);
    FAST;

    int n; cin>>n;
    multiset<int> st;
    vector<int> a(n);
    rep(i,n){
        cin>>a[i];
        st.insert(a[i]);
    }

    sort(lla(a));

    ll count = 0;

    for(int i=(n/2)-1;i<n;++i){
        if(st.lower_bound(2*a[i]) != st.end()){
            st.erase(st.find(a[i]));
            st.erase(st.lower_bound(2*a[i]));
            ++count;
        }
    }
    pn(n-count);
}


#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <queue>
#include <iomanip>

#define rep(i, a, b) for (long long i = a; i < b; i++)
#define rip(i, a, b) for (long long i = a; i >= b; i--)
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    vector <int> alwani;
    rep(i,0,n){
        int s;
        cin >> s;
        alwani.push_back(s);
    }
    sort(alwani.rbegin(), alwani.rend());
    /*int start=0,end=n;
    while(start!=end-1)
    {
        int middle = (start+end)/2;
        if( alwani[middle]*2 <= alwani[0])
            end=middle;
        else
            start=middle;
    }*/
    int y=n/2, count= n;
    //cout << alwani[end] << endl;
    rep(i,0,n){
        if(alwani[i] >= alwani[y]*2){
            count--;
            y++;
        } else{
            y++;
            i--;
        }

        if (y>=n){
            break;
        }
    }
    cout << count << endl;
}