//ThE.EnD.AnD.ThE.BeGiNiNg ;
/*
 What made me tough
 Almost killed me
 At least that's how
 I remember the story
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
const int N = 1e7+10 ;
int n,ans ;
string a,b ;
int main(){
        ios_base::sync_with_stdio(false); cin.tie(0);
        cin >> a >> b ;
        n = a.size() ;
        int a4=0,b4=0,a7=0,b7=0 ;
        for ( int i=0 ; i<n ; i++ ){
            if ( a[i]=='4' )
                a4++ ;
            else
                a7++ ;
            if ( b[i]=='4' )
                b4++ ;
            else
                b7++ ;
        }
        if ( a4>b4 ){
            a4 -= b4 ;
            for ( int i=0 ; i<n && a4 ; i++ ){
                if ( a[i]=='4' && b[i]=='7' ){
                    ans++ ;
                    a[i] = '7' ;
                    a4-- ;
                    a7++ ;
                }
            }
        }
        else if ( a7>b7 ){
            a7 -= b7 ;
            for ( int i=0 ; i<n && a7 ; i++ ){
                if ( a[i]=='7' && b[i]=='4' ){
                    ans++ ;
                    a[i] = '4' ;
                    a7-- ;
                    a4++ ;
                }
            }
        }
        for ( int i=0 ; i<n ; i++ ){
            if ( a[i]=='4' && b[i]=='7' )
                ans++ ;
        }
        cout << ans << '\n' ;
        return 0 ;
}


//author: zekigurbuz (Zeki Gurbuz) 2019
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<pii> vpii;
typedef queue<int> qi;
typedef map<string, int> msi;
typedef map<int, int> mii;
typedef map<int, vi> mvi;
typedef map<int, vpii> mvpii;
typedef priority_queue<int> pqi;
typedef set<int> si;

#define int ll
#define double ld
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define rsz resize
#define forn(a,b) for(int a=0;a<b;++a)
#define rep(a,b,c) for(int a=b;a<c;++a)
#define all(x) begin(x),end(x)
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);

const ld PI=4*atan((ld)1);
const int MOD=1000000007;//998244353
const ll INF=0x3FFFFFFFFFFFFFFFLL;
const int N=200005;

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

template<class T>void ckmin(T&a,T b){a=min(a,b);}
template<class T>void ckmax(T&a,T b){a=max(a,b);}
template<class T>using Tree=tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;

string Eval(bool b){return(b?"Yes":"No");}
string eval(bool b){return(b?"yes":"no");}
string EVAL(bool b){return(b?"YES":"NO");}

string a, b;
int four, seven;

void precomp() {

}

void solve(int testCaseNumber) {
	cin >> a >> b;
	forn(i, a.length()) {
		if (a[i] == '4' && b[i] != '4') four++;
		if (a[i] == '7' && b[i] != '7') seven++;
	}
	int ans = min(four, seven);
	four -= ans;
	seven -= ans;
	ans += four + seven;
	cout << ans << endl;
}

signed main(){fastio//freopen("replace.in", "r", stdin);freopen("replace.out", "w", stdout);

	precomp();
	int t = 1;
//	cin >> t;
	rep(i, 1, t + 1) solve(i);

return 0;}

//hellobig_tq//hello//hello


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

#define ll long long

int main()
{
    string a,b,s,ss;
    ll len,i,j, ok=0,fr=0,sv=0;
    s="";
    ss="";
    cin>>a>>b;
    s=a;
    ss=b;
    len=a.size();
  for(i=0; i<len; i++)
  {
      if(a[i]!=b[i]){
        if(a[i]=='4')fr++;
        else sv++;
      }
  }
  cout<<max(fr,sv)<<endl;
}


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

#define ll long long

int main()
{
    string a,b,s,ss;
    ll len,i,j, ok=0;
    s="";
    ss="";
    cin>>a>>b;
    s=a;
    ss=b;
    len=a.size();
    sort(a.begin(),a.end());
    sort(b.begin(),b.end());
    if(a==b)
    {
        for(i=0; i<len; i++)
        {
            if(s[i]!=ss[i])ok++;
        }
        cout<<ok/2<<endl;
    }
    else{
        for(i=0; i<len; i++)
        {
            if(a[i]!=b[i])ok++;
        }
        cout<<ok<<endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int T;
//    cin >> T;

//    for(int t=1; t <= T; ++t)
    {
        string a, b;
        cin >> a >> b;
        int n = a.size();
        int shouldBe4 = 0, shouldBe7 = 0;
        for(int i=0; i < n; ++i)
            if(a[i] != b[i])
                (a[i] == '4' ? shouldBe7++ : shouldBe4++);
        int res = min(shouldBe4, shouldBe7);
        res += max(shouldBe4, shouldBe7) - res;
        cout << res << endl;
    }

    return 0;
}


#include<cstring>
#include<cstdio>
using namespace std;
const int N = 100010;
char s1[N], s2[N];
int n;

int main() {
	scanf("%s%s", s1, s2);
	n = strlen(s1);
	int cnt1 = 0, cnt2 = 0;
	for (int i = 0; i < n; ++i)
		if (s1[i] != s2[i]) {
			cnt1 += (s1[i] == '4');
			cnt2 += (s1[i] == '7');
		}
	int ans = 0;
	if (cnt1 < cnt2) ans = cnt1 + cnt2 - cnt1;
	if (cnt1 > cnt2) ans = cnt1 + cnt2 - cnt2;
	if (cnt1 == cnt2) ans = cnt1;
	printf("%d\n", ans);

	return 0;
}


#include<iostream>
#include<algorithm>

using namespace std;

int main()
{
    string s1,s2;
    cin>>s1>>s2;
    int n=s1.size();
    int k1=0;
    int k2=0;
    for (int i=0; i<n; i++)
        if (s1[i]!=s2[i])
        if (s1[i]=='4') k1++;
    else k2++;
    cout<<max(k1,k2);
}


#include <bits/stdc++.h>
#define ull unsigned long long
#define endl '\n'
#define ll long long
#define pb push_back
#define mp make_pair
#define line cout<<"-------------------------"<<endl
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
#define filein freopen("input.txt","r",stdin)
#define fileout freopen("output.txt","w",stdout)
using namespace std;
const int mx=300009;
int main()
{
    string a,b;
    cin>>a>>b;
    int cnt=0;
    int c=0;
    for(int i=0;i<a.size();i++)
    {
        if(a[i]!=b[i]) cnt++;
        if(a[i]=='4') c--;
        if(b[i]=='4') c++;
    }
    if(c<0) c=-c;
    cnt-=c;
    cout<<c+cnt/2<<endl;
}


#include<bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define pb push_back
using namespace std;
string n,m;ll sum,num,sam,nam,sum1,num1,sam1,nam1;
int main(){
    cin>>n>>m;
    for(int i = 0;i < n.size();++i){
        if(m[i]=='4'){
            sum++;
        }
        else{
            num++;
        }
        if(n[i]=='4'){
            sam++;
        }
        else{
            nam++;
        }
    }
    if(sum==sam&&num==nam){
        for(int i = 0;i  < n.size();++i){
            if(n[i]!=m[i]){
                sum1++;
            }
        }
        cout<<sum1/2;
        return 0;
    }
    else{
        sum=sam=num=nam=0;
        for(int i = 0;i < n.size();++i){
            if(m[i]=='7'&&n[i]!=m[i]){
                for(int j = 0;j < n.size();++j){
                    if(m[j]=='4'&&m[j]!=n[j]){
                        swap(m[j],m[i]);
                        num1++;
                        num=1;
                        break;
                    }
                }
                if(num==0){
                    num1++;
                    m[i]='4';
                }
                num=0;
            }
            else if(m[i]=='4'&&m[i]!=n[i]){
                for(int j = 0;j < n.size();++j){
                    if(m[j]=='7'&&n[j]!=m[j]){
                        swap(m[j],m[i]);
                        num1++;
                        sum=1;
                        break;
                    }
                }
                if(sum==0){
                    num1++;
                    m[i]='7';
                }
                sum=0;
            }
        }
    }
    cout<<num1;
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define pb push_back
using namespace std;
string n,m;ll sum,num,sam,nam,sum1,num1,sam1,nam1;
int main(){
    cin>>n>>m;
    for(int i = 0;i < n.size();++i){
        if(m[i]=='4'){
            sum++;
        }
        else{
            num++;
        }
        if(n[i]=='4'){
            sam++;
        }
        else{
            nam++;
        }
    }
    if(sum==sam&&num==nam){
        for(int i = 0;i  < n.size();++i){
            if(n[i]!=m[i]){
                sum1++;
            }
        }
        cout<<sum1/2;
        return 0;
    }
    sum=sam=num=nam=0;
    for(int i = 0;i < n.size();++i){
        if(m[i]=='4'&&m[i]!=n[i]){
            sum++;
        }
        else if(m[i]=='7'&&m[i]!=n[i]){
            num++;
        }
    }
    num1=min(sum,num);
    sum-=num1;
    num-=num1;
    num1+=sum;
    num1+=num;
    cout<<num1;
    return 0;
}


#include<bits/stdc++.h>

#define SZ(x) ((int(x.size())))

typedef long long ll;
typedef long double ld;

using namespace std;

string s, t;
int a, b;

int main()
{
    cin >> s >> t;
    for (int i = 0; i < s.length(); i++)
    {
        if (s[i] == '4' && t[i] == '7')
            a++;
        else if (s[i] == '7' && t[i] == '7')
            b++;
    }
    cout << max (a, b);
	return 0;
}


#include<bits/stdc++.h>

#define SZ(x) ((int(x.size())))

typedef long long ll;
typedef long double ld;

using namespace std;

string s, t;
int a, b;

int main()
{
    cin >> s >> t;
    for (int i = 0; i < s.length(); i++)
    {
        if (s[i] == '4' && t[i] == '7')
            a++;
        else if (s[i] == '7' && t[i] == '4')
            b++;
    }
    cout << max (a, b);
	return 0;
}


#include <algorithm>
#include <cstdio>
#include <cstring>
#include <map>
#include <math.h>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

typedef long long ll;

const int MAX_LEN = 100000;

char a[MAX_LEN + 1], b[MAX_LEN + 1];

int solve() {
   int len = strlen(a);
   int type47 = 0, type74 = 0;
   for (int i = 0; i < len; i++) {
      if (a[i] == b[i]) {
         continue;
      }
      if (a[i] == '4') {
         type47++;
      } else if (a[i] == '7') {
         type74++;
      }
   }
   return type47 + type74 - min(type47, type74);
}

int main() {

   scanf("%s", a);
   scanf("%s", b);

   int ans = solve();
   printf("%d\n", ans);

   return 0;
}


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

typedef long long i64;

int main() {
    #ifndef ONLINE_JUDGE
    freopen("task.in", "r", stdin);
    freopen("task.out", "w", stdout);
    #endif // ONLINE_JUDGE
    ios::sync_with_stdio(false);

    string A, B;
    cin >> A >> B;
    int N = A.length();

    int s1 = 0, s2 = 0, ans = 0;
    for (int i = 0; i < N; ++i) {
        if (A[i] == '7' && B[i] == '4') ++s1;
        else if (A[i] == '4' && B[i] == '7') ++s2;
    }
    ans = max(s1, s2);
    cout << ans << '\n';
}


#include<bits/stdc++.h> /*
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including */
using namespace std;
//using namespace __gnu_pbds;

//typedefs

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int,int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef vector<int>::iterator vit;
typedef set<int>::iterator sit;

/*
template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template<typename F, typename S>
using ordered_map = tree<F, S, less<F>, rb_tree_tag, tree_order_statistics_node_update>;
*/

//#Defines
#define rep(i,a,b)	for(i=a;i<=b;i++)
#define repR(i,a,b)	for(i=a;i>=b;i--)
//#define pb push_back
#define pb emplace_back
#define F first
#define S second
#define mp make_pair
#define all(c)		c.begin(),c.end()
#define endl '\n'
#define pf printf
#define sf scanf
//#define left __left
//#define right __right
//#define tree __tree
#define MOD 1000000007
//#define harmonic(n) 0.57721566490153286l+log(n)

#define RESET(a,b)	memset(a,b,sizeof(a))
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*(b/gcd(a,b)))
#define sqr(a) ((a) * (a))

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const ll infLL = 9000000000000000000;

//Bit Operations
inline bool checkBit(ll n, int i) { return n&(1LL<<i); }
inline ll setBit(ll n, int i) { return n|(1LL<<i);; }
inline ll resetBit(ll n, int i) { return n&(~(1LL<<i)); }

int fx[] = {0, 0, +1, -1};
int fy[] = {+1, -1, 0, 0};
//int dx[] = {+1, 0, -1, 0, +1, +1, -1, -1};
//int dy[] = {0, +1, 0, -1, +1, -1, +1, -1};

//Inline functions

inline bool EQ(double a, double b) { return fabs(a-b) < 1e-9; }
inline bool isLeapYear(ll year) { return (year%400==0) || (year%4==0 && year%100!=0); }
inline void normal(ll &a) { a %= MOD; (a < 0) && (a += MOD); }
inline ll modMul(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a*b)%MOD; }
inline ll modAdd(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a+b)%MOD; }
inline ll modSub(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); a -= b; normal(a); return a; }
inline ll modPow(ll b, ll p) { ll r = 1; while(p) { if(p&1) r = modMul(r, b); b = modMul(b, b); p >>= 1; } return r; }
inline ll modInverse(ll a) { return modPow(a, MOD-2); }
inline ll modDiv(ll a, ll b) { return modMul(a, modInverse(b)); }
inline bool isInside(pii p,ll n,ll m)	{ return (p.first>=0&&p.first<n&&p.second>=0&&p.second<m); }
inline bool isInside(pii p,ll n)		{ return (p.first>=0&&p.first<n&&p.second>=0&&p.second<n); }
inline bool isSquare(ll x) 				{ ll s = sqrt(x);	return (s*s==x); }
inline bool isFib(ll x) 				{ return isSquare(5*x*x+4)|| isSquare(5*x*x-4); }
inline bool isPowerOfTwo(ll x)			{ return ((1LL<<(ll)log2(x))==x); }

struct func
{
	//this is a sample overloading function for sorting stl
	bool operator()(pii const &a, pii const &b)
	{
		if(a.F==b.F)
			return (a.S<b.S);
		return (a.F<b.F);
	}
};

//Prime Number Generator

/*
#define M 100000000
int marked[M/64 + 2];

#define on(x) (marked[x/64] & (1<<((x%64)/2)))
#define mark(x)  marked[x/64] |= (1<<((x%64)/2))

vl prime;

bool isPrime(int num) {
  return num > 1 && (num == 2 || ((num & 1) && !on(num)));
}

void sieve(ll n) {
	for (ll i = 3; i * i < n; i += 2) {
		if (!on(i)) {
			for (ll j = i * i; j <= n; j += i + i) {
				mark(j);
			}
		}
	}
	prime.pb(2);
	for(ll i = 3; i <= n; i += 2) {
		if(!on(i))	prime.pb(i);
	}
}

*/

//
//debug
#ifdef tajir
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
	return os << "(" << p.first << ", " << p.second << ")";
}

template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
	os << "{";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
			os << *it;
	}
	return os << "}";
}

template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
	os << "[";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
			os << *it;
	}
	return os << "]";
}

template < typename T >
ostream &operator << ( ostream & os, const multiset< T > &v ) {
	os << "[";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
		os << *it;
	}
	return os << "]";
}

template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
	os << "[";
	for(auto it = v.begin(); it != v.end(); ++it) {
		if( it != v.begin() ) os << ", ";
		os << it -> first << " = " << it -> second ;
		}
	return os << "]";
}

#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

clock_t tStart = clock();
#define timeStamp dbg("Execution Time: ", (double)(clock() - tStart)/CLOCKS_PER_SEC)

void faltu () {
	cerr << endl;
}

template <typename T>
void faltu( T a[], int n ) {
	for(int i = 0; i < n; ++i) cerr << a[i] << ' ';
	cerr << endl;
}

template <typename T, typename ... hello>
void faltu( T arg, const hello &... rest) {
	cerr << arg << ' ';
	faltu(rest...);
}
#else
#define dbg(args...)
#endif // tajir

int main()
{
	#ifdef tajir
		freopen("input.txt", "r", stdin);
	#else
		// online submission
	#endif
	optimize();
	int _7 = 0 , _4 = 0;
	string a,b;
	cin >> a >> b;
	for(int i = 0; i < a.size(); ++i) {
		if(a[i] == b[i])	continue;
		if(a[i] == '7')
			_7++;
		else
			_4++;
	}
	int ans = 0;
	ans += min(_7 , _4);
	int mi = min(_7 , _4);
	_7 -= mi;
	_4 -= mi;
	ans += _7;
	ans += _4;
	cout << ans << endl;
	return 0;
}

//?


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define pb push_back
#define mp(x,y) make_pair(x,y)
#define scd(n) scanf("%d",&n)
#define sclf(n) scanf("%lf",&n)
#define scl(n) scanf("%I64d",&n)
#define repi(a,b,c) for(int i=a;i<b;i+=c)
#define repis(a,b,c) for(int i=a-1;i>=b;i-=c)
#define repj(a,b,c) for(int j=a;j<b;j+=c)
#define repjs(a,b,c) for(int j=a-1;j>=b;j-=c)
#define repk(a,b,c) for(int k=a;k<b;k+=c)
#define repks(a,b,c) for(int k=a-1;k>=0;k-=c)
#define fi first
#define se second

typedef pair<ll,ll> ii;
const int mx = 100100;
const int md = 1e9+7;

int main() {
    string x,y;
    cin >> x >> y;
    int a=0,b=0,c=0,d=0;
    repi(0,x.length(),1) {
        if(x[i] != y[i]) {
            if(x[i] == '4') a++;
            else b++;
            if(y[i] == '4') c++;
            else d++;
        }
    }
    a = min(a,c) + abs(a-c) ;
    b = min(b,d) + abs(b-d);
    cout << min(a,b) << endl;
}


 //in the name of god
#include<bits/stdc++.h>
using namespace std;

const int MAXN = 1001 * 1001 , MOD1 =1e9+7 , MOD2 = 1e14+2  ;

vector < int > v1,v2,v3,v4;

main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    string s,t;
    cin >> s >> t ;
    int  n = s.size();
    for( int  i = 0 ; i < n ; i++)
    {
        if(s[i]=='4')
            v1.push_back(i);
        else
            v2.push_back(i);
        if(t[i]=='4')
            v3.push_back(i);
        else
            v4.push_back(i);
    }
    int ans = abs((int)v1.size()-(int)v3.size()) + abs((int)v2.size()-(int)v4.size());
    if(v1.size()>v3.size())
    {
        int x = 0;
        for(auto u : v1)
        {
            if(v1.size()-x==v3.size())
                break;
            if(t[u]=='7')
            {
                x++;
                s[u]='7';
            }
        }
    }
    else
    {
        int x = 0;
        for(auto u : v3)
        {
            if(v3.size()-x==v1.size())
                break;
            if(s[u]=='7')
            {
                x++;
                s[u]='4';
            }
        }
    }
    if(v2.size()>v4.size())
    {
        int x = 0;
        for(auto u : v1)
        {
            if(v2.size()-x==v4.size())
                break;
            if(t[u]=='4')
            {
                x++;
                s[u]='4';
            }
        }
    }
    else
    {
        int x = 0;
        for(auto u : v1)
        {
            if(v2.size()-x==v4.size())
                break;
            if(s[u]=='4')
            {
                x++;
                s[u]='7';
            }
        }
    }
    int x = 0 ;
    for(int i = 0 ; i < n ; i ++)
        if(s[i]!=t[i])
            x++;
    cout << ans/2 + x/2;

}


 //in the name of god
#include<bits/stdc++.h>
using namespace std;

const int MAXN = 1001 * 1001 , MOD1 =1e9+7 , MOD2 = 1e14+2  ;

vector < int > v1,v2,v3,v4;

main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    string s,t;
    cin >> s >> t ;
    int  n = s.size();
    for( int  i = 0 ; i < n ; i++)
    {
        if(s[i]=='4')
            v1.push_back(i);
        else
            v2.push_back(i);
        if(t[i]=='4')
            v3.push_back(i);
        else
            v4.push_back(i);
    }
    int ans = 0;
    if(v1.size()>v3.size())
    {
        int x = 0;
        for(auto u : v1)
        {
            if(v1.size()-x==v3.size())
                break;
            if(t[u]=='7')
            {
                x++;
                s[u]='7';
                ans++;
            }
        }
    }
    if(v2.size()>v4.size())
    {
        int x = 0;
        for(auto u : v1)
        {
            if(v2.size()-x==v4.size())
                break;
            if(t[u]=='4')
            {
                x++;
                s[u]='4';
                ans++;
            }
        }
    }

    int x = 0 ;
    for(int i = 0 ; i < n ; i ++)
        if(s[i]!=t[i])
            x++;
    cout << ans + x/2;

}


 //in the name of god
#include<bits/stdc++.h>
using namespace std;

const int MAXN = 1001 * 1001 , MOD1 =1e9+7 , MOD2 = 1e14+2  ;

vector < int > v1,v2,v3,v4;

main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    string s,t;
    cin >> s >> t ;
    int  n = s.size();
    for( int  i = 0 ; i < n ; i++)
    {
        if(s[i]=='4')
            v1.push_back(i);
        else
            v2.push_back(i);
        if(t[i]=='4')
            v3.push_back(i);
        else
            v4.push_back(i);
    }
    int ans = 0;
    if(v1.size()>v3.size())
    {
        int x = 0;
        for(auto u : v1)
        {
            if(v1.size()-x==v3.size())
                break;
            if(t[u]=='7')
            {
                x++;
                s[u]='7';
                ans++;
            }
        }
    }
    if(v2.size()>v4.size())
    {
        int x = 0;
        for(auto u : v2)
        {
            if((int)v2.size()-x==(int)v4.size())
                break;

            if(t[u]=='4')
            {
                x++;
                s[u]='4';
                ans++;
            }
        }
    }

    int x = 0 ;
    for(int i = 0 ; i < n ; i ++)
        if(s[i]!=t[i])
            x++;
    cout << ans + x/2;

}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <random>
#include <chrono>

using namespace std;
using namespace __gnu_pbds;

#define endl '\n'

typedef long long ll;
typedef pair<ll, ll> pii;
typedef tree<int, null_type,less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

template<typename T>
static T randint(T lo, T hi){
	return uniform_int_distribution<T>(lo, hi)(rng);
}

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

	// freopen("dislodging_logs_input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	string a, b;
	cin >> a >> b;

	int ans = 0, s1 = 0, s2 = 0;

	for(int i = 0; i < a.size(); i++){
		if(a[i] == b[i])
			continue;

		if(a[i] == '4')
			s1++;
		else
			s2++;
	}

	int mn = min(s1, s2);
	ans += mn;

	s1 -= mn;
	s2 -= mn;

	ans += s1 + s2;

	cout << ans << endl;

	return 0;
}


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

int main()
{
	string  a,b;
	while(cin>>a>>b)
    {
        int cnt1=0,cnt2=0;
        for(int i=0;i<a.length();i++)
        {

            if(a[i]=='4'&&b[i]=='7')
                cnt1++;
            if(a[i]=='7'&&b[i]=='4')
                cnt2++;
        }
        cout<<max(cnt1,cnt2)<<endl;
    }
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int Max=100010;
char s1[Max],s2[Max];
int num1,num2,num3,num4;
int sum;
int main()
{
    scanf("%s",s1);
    scanf("%s",s2);
    num1=0;
    num2=0;
    num3=0;
    num4=0;
    int len=strlen(s1);
    for(int i=0;i<len;i++)
    {
        if(s1[i]=='4')
        {
            num1++;
        }
        else if(s1[i]=='7')
        {
            num2++;
        }
        if(s2[i]=='4')
        {
            num3++;
        }
        else if(s2[i]=='7')
        {
            num4++;
        }
    }
    int n1=abs(num1-num3);
    int n2=abs(num2-num4);
    sum=n1+n2-min(n1,n2);
    printf("%d\n",sum);
    return 0;
}


/*#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<string>
#include<vector>
using namespace std;
const int Max=1010;
vector<int>temp[Max];
int low[Max],dfn[Max];
int vis[Max];
int n,m,cnt,root,a,b;
int flag;
void dfs(int u,int fa)
{
    vis[u]=1;
    dfn[u]=low[u]=++cnt;
    int num=0;
    for(int i=0;i<temp[u].size();i++)
    {
        int v=temp[u][i];
        if(vis[v]==-1)
        {
            continue;
        }
        if(vis[v]==0)
        {
            dfs(v,u);
            num++;
            low[u]=min(low[u],low[v]);
            if((u==root&&num>1)||(u!=root&&low[v]>=dfn[u]))
            {
                flag=1;
                return;
            }
        }
        else if(vis[v]==1&&v!=fa)
        {
            low[u]=min(low[u],dfn[v]);
        }
    }
    return;
}
void init()
{
    flag=0;
    for(int i=0;i<=n;i++)
    {
        temp[i].clear();
    }
}
int main()
{
    while(scanf("%d%d",&n,&m)!=-1)
    {
        if(n==0&&m==0)break;
        init();
        for(int i=1;i<=m;i++)
        {
            scanf("%d%d",&a,&b);
            temp[a].push_back(b);
            temp[b].push_back(a);
        }
        for(int i=0;i<n;i++)
        {
            memset(vis,0,sizeof(vis));
            memset(dfn,0,sizeof(dfn));
            memset(low,0,sizeof(low));
            vis[i]=-1;
            root=0;
            cnt=0;
            if(i==0)
            {
                root=1;
            }
            dfs(root,-1);
            for(int j=0;j<n;j++)
            {
                if(vis[j]==0)
                {
                    flag=1;
                    break;
                }
            }
            if(flag==1)
            {
                break;
            }
        }
        if(flag)
        {
            printf("NO\n");
        }
        else
        {
            printf("YES\n");
        }
    }
    return 0;
}*/
#include<bits/stdc++.h>
using namespace std;
const int Max=100010;
char s1[Max],s2[Max];
int num1,num2;
int sum;
int main()
{
    scanf("%s",s1);
    scanf("%s",s2);
    num1=0;
    num2=0;
    sum=0;
    int len=strlen(s1);
    for(int i=0;i<len;i++)
    {
        if(s1[i]!=s2[i]&&s1[i]=='4')
        {
            num1++;
        }
        else if(s1[i]!=s2[i]&&s1[i]=='7')
        {
            num2++;
        }
    }
    sum=num1+num2-min(num1,num2);
    printf("%d\n",sum);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define sz(c)  (int)((c).size())
#define all(c) ((c).begin()), ((c).end())

typedef long long ll;
typedef pair<int, int> pii;

const int oo = (int)1e9+7;

int main()
{

	string a, b;
	cin >> a >> b;

	vector<int> x, y;

	int n = sz(a);

	for (int i = 0; i < n; ++i)
	{
		if (a[i] == b[i]) continue;
		if (a[i] == '4' && b[i] == '7')
			x.push_back(i);
		else if (a[i] == '7' && b[i] == '4')
			y.push_back(i);
	}

	int ans = min(sz(x), sz(y));

	for (int i = 0; i < min(sz(x), sz(y)); ++i)
		swap(a[x[i]], a[y[i]]);

	for (int i = 0; i < n; ++i)
		if (a[i] != b[i])
			++ans;

	cout << ans;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define sz(c)  (int)((c).size())
#define all(c) ((c).begin()), ((c).end())

typedef long long ll;
typedef pair<int, int> pii;

const int oo = (int)1e9+7;

int main()
{

	string a, b;
	cin >> a >> b;

	int x = 0, y = 0;

	int n = sz(a);

	for (int i = 0; i < n; ++i)
	{
		if (a[i] == b[i]) continue;
		if (a[i] == '4'&&b[i] == '7') ++x;
		else ++y;
	}

	cout << max(x, y);

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define sz(c)  (int)((c).size())
#define all(c) ((c).begin()), ((c).end())

typedef long long ll;
typedef pair<int, int> pii;

const int oo = (int)1e9+7;

int main()
{

	string a, b;
	cin >> a >> b;

	vector<int> x, y;

	int n = sz(a);

	for (int i = 0; i < n; ++i)
	{
		if (a[i] == b[i]) continue;
		if (a[i] == '4' && b[i] == '7')
			x.push_back(i);
		else if (a[i] == '7' && b[i] == '4')
			y.push_back(i);
	}

	int ans = 0;

	while (sz(x) && sz(y))
	{
		int xx = x.back();
		int yy = y.back();
		swap(a[xx], a[yy]);
		x.pop_back();
		y.pop_back();
		++ans;
	}

	for (int i = 0; i < n; ++i)
		if (a[i] != b[i])
			++ans;

	cout << ans;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define sz(c)  (int)((c).size())
#define all(c) ((c).begin()), ((c).end())

typedef long long ll;
typedef pair<int, int> pii;

const int oo = (int)1e9+7;

int main()
{

	string a, b;
	cin >> a >> b;

	vector<int> x, y;

	int n = sz(a);

	for (int i = 0; i < n; ++i)
	{
		if (a[i] == b[i]) continue;
		if (a[i] == '4' && b[i] == '7')
			x.push_back(i);
		else if (a[i] == '7' && b[i] == '4')
			y.push_back(i);
	}

	int ans = 0;

	for (int i = 0; i < min(sz(x), sz(y)); ++i)
		swap(a[x[i]], a[y[i]]);

	for (int i = 0; i < n; ++i)
		if (a[i] != b[i])
			++ans;

	cout << ans;

	return 0;
}


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

///Print
#define pf(a)  printf("%lld",a)
#define pff(a,b)  printf("%lld %lld",a,b)
#define pfff(a,b,c)  printf("%lld %lld %lld",a,b,c)
#define nl printf("\n")
#define spc printf(" ")
#define Ca(no) printf("Case %lld: ",++no)
#define Canl(no) printf("Case %lld:\n",++no)
#define Cah(no) printf("Case #%lld: ",++no)
#define Cahnl(no) printf("Case #%lld:\n",++no)

///Scanf
#define sf(n)       scanf("%lld", &n)
#define sff(a,b)    scanf("%lld %lld", &a, &b)
#define sfff(a,b,c) scanf("%lld %lld %lld", &a, &b, &c)

///LOOP
#define rep(x,n) for(__typeof(n) x=0;x<(n);x++)
#define reps(i,x) for(int  i=0;i<(x.size());i++)
#define repp(x,n) for(__typeof(n) x=1;x<=(n);x++)
#define FOR(x,m,n) for(__typeof(n) x=(m);x<=(n);x++)
#define foreach(x,n) for(__typeof(n.begin()) x=n.begin();x!=n.end();x++)

///Shortcut
#define mem(ar,value) memset(ar,value,sizeof(ar))
#define all(x) x.begin(),x.end()
#define Unique(store) store.resize(unique(store.begin(),store.end())-store.begin())
#define sqr(x) ((x)*(x))
#define len(s) s.size()
#define mp make_pair
#define pb push_back
#define xx first
#define yy second

///Min AND Max
#define min4(a,b,c,d) min(min(a,b),min(c,d))
#define max4(a,b,c,d) max(max(a,b),max(c,d))
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))

#define maxall(v) *max_element(all(v))
#define minall(v) *min_element(all(v))

#define inf (1e15)
#define eps (1e-9)
#define PI acos(-1.0)
#define pi 3.14159265358979323846
#define isEq(a,b) (fabs((a)-(b))<eps)
#define Dist(x1,y1,x2,y2) (sqrt(sqr((x1)-(x2))+sqr((y1)-(y2))))
#define spDist(lat1,long1,lat2,long2,r) ((r)*acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos((long1)-(long2))))
#define area(x1,y1,x2,y2,x3,y3) ( x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2) )
#define sqr(x) ((x)*(x))
#define distSqr(x1,y1,x2,y2) ( sqr(x1-x2) + sqr(y1-y2) )
#define dist4adj(x1,y1,x2,y2) ( abs(x1-x2) + abs(y1-y2) )
#define dist8adj(x1,y1,x2,y2) max( abs(x1-x2) , abs(y1-y2) )

///File
#define READ freopen("input.txt","r",stdin)
#define WRITE freopen("output.txt","w",stdout)

/**Define Bitwise operation**/

template<class T> inline T lowbit(T n){return (n^(n-1))&n;}//NOTES:lowbit(
template<class T> inline int countbit(T n){return (n==0)?0:(1+countbit(n&(n-1)));}
#define check(n, pos) (n & (1<<(pos)))
#define biton(n, pos) (n | (1<<(pos)))
#define bitoff(n, pos) (n & ~(1<<(pos)))

#define ledzero(n) (__builtin_clz(n))
#define trailzero(n) (__builtin_ctz(n))
#define onbit(n) (__builtin_popcount(n))

///upper bound and lower bound
#define LB(a,value) (lower_bound(all(a),value)-a.begin())
#define UB(a,value) (upper_bound(all(a),value)-a.begin())

///DEBUG
#define dbg(x) cout<<#x<<": "<<x<<endl
#define dbgar(i,a) cout<<#a<<"["<<i<<"] = "<<a[i]<<" "<<endl

#define trace(x) cerr<<x<<endl;
#define d1(x) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#x" = "<<x<<endl;
#define d2(x,y) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#x" = "<<x<<" | "#y" = "<<y<<endl;
#define d3(x,y,z) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#x" = "<<x<<" | "#y" = "<<y<<" | "#z" = "<<z<<endl;
#define d4(a,b,c,d) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#a" = "<<a<<" | "#b" = "<<b<<" | "#c" = "<<c<<" | "#d" = "<<d<<endl;
#define d5(a,b,c,d,e) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#a" = "<<a<<" | "#b" = "<<b<<" | "#c" = "<<c<<" | "#d" = "<<d<<" | "#e" = "<<e<<endl;
#define d6(a,b,c,d,e,f) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#a" = "<<a<<" | "#b" = "<<b<<" | "#c" = "<<c<<" | "#d" = "<<d<<" | "#e" = "<<e<<" | "#f" = "<<f<<endl;

///Gcd and Lcm
template<class T>T gcd(T a,T b){return b == 0 ? a : gcd(b, a % b);}
template<typename T>T lcm(T a, T b) {return a / gcd(a,b) * b;}

///Bigmod && Pow
template<class T>T my_pow(T n,T p){if(p==0)return 1;T x=my_pow(n,p/2);x=(x*x);if(p&1)x=(x*n);return x;} ///n to the power p
template<class T>T big_mod(T n,T p,T m){if(p==0)return (T)1;T x=big_mod(n,p/2,m);x=(x*x)%m;if(p&1)x=(x*n)%m;return x;}
template<class T> inline T Mod(T n,T m) {return (n%m+m)%m;} ///For Positive Negative No.

template<class T>T multiplication(T n,T p,T m){if(p==0)return (T)0;T x=multiplication(n,p/2,m);x=(x+x)%m;if(p&1)x=(x+n)%m;return x;}
bool isVowel(char ch){ ch=toupper(ch); if(ch=='A'||ch=='U'||ch=='I'||ch=='O'||ch=='E') return true; return false;}

///string to int
template <class T> T extract(string s, T ret) {stringstream ss(s); ss >> ret; return ret;}/// extract words or numbers from a line

template<class T> string itos(T n){ostringstream ost;ost<<n;ost.flush();return ost.str();}///NOTES:toString(
ll stoi(string s){ll r=0;istringstream sin(s);sin>>r;return r;}///NOTES:toInt(
double toDouble(string s){double r=0;istringstream sin(s);sin>>r;return r;}

/**Direction**/
///8 Direction
///int col[8] = {0, 1, 1, 1, 0, -1, -1, -1};int row[8] = {1, 1, 0, -1, -1, -1, 0, 1};
///4 Direction
///int col[4] = {1, 0, -1, 0};int row[4] = {0, 1, 0, -1};
///Knight Direction
///int dx[]={2,1,-1,-2,-2,-1,1,2};int dy[]={1,2,2,1,-1,-2,-2,-1};
///Hexagonal Direction
///int dx[]={-1,-1,+0,+1,+1,+0};int dy[]={-1,+1,+2,+1,-1,-2};
///struct
/*
struct node
{
    ll x,y;
    ll z;
}arr[200005];

bool com(node a, node b)
{
   if(a.x==b.x)return a.y>b.y;
   //else
   return a.x<b.x;
}
*/

typedef   queue <int> qi;
typedef   pair<ll,ll>  pii;
typedef   vector< pii > vpii;
typedef   vector<long long>   vi;
typedef   vector<string>  vs;
typedef   vector<char> vc;
///MAP
typedef   map<string,ll>  msi;
typedef   map<ll,ll>  mii;
typedef   map<char,ll>  mci;
typedef map<char,char>  mcc;

ll a,b,c=0,n,m,r=0,rr=0,f=0,ff=0,ks=0;

string s,ss;

ll dp[505][505];
ll ar[54300];
ll chk(ll aa,ll bb)
{
    ll kk=0,mm=1;
    while(aa)
    {
        if(aa%10==7 or aa%10==4)
        {
            kk=kk+((aa%10)*mm);
            mm*=10;
        }
        aa/=10;
    }
    //if(mm==147)cout<<kk<<" ";
    if(kk==bb)return true;
    else return false;
}

int main()
{
    string s,ss;
    cin>>s>>ss;
    ll aa=count(s.begin(),s.end(),'4');
    ll bb=count(s.begin(),s.end(),'7');
    ll cc=count(ss.begin(),ss.end(),'4');
    ll dd=count(ss.begin(),ss.end(),'7');
    ll diff=0;
    if(aa>cc)
    {
        diff=aa-cc;
    }
    if(bb>dd)
    {
        diff=bb-dd;
    }
    reps(i,s)
    {
        if(s[i]!=ss[i])c++;
    }
    c-=diff;
    if(c<=diff)
    {
        cout<<diff;return 0;
    }
    diff+=(c/2)+(c%2);
    cout<<diff;

   return 0;

}


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

///Print
#define pf(a)  printf("%lld",a)
#define pff(a,b)  printf("%lld %lld",a,b)
#define pfff(a,b,c)  printf("%lld %lld %lld",a,b,c)
#define nl printf("\n")
#define spc printf(" ")
#define Ca(no) printf("Case %lld: ",++no)
#define Canl(no) printf("Case %lld:\n",++no)
#define Cah(no) printf("Case #%lld: ",++no)
#define Cahnl(no) printf("Case #%lld:\n",++no)

///Scanf
#define sf(n)       scanf("%lld", &n)
#define sff(a,b)    scanf("%lld %lld", &a, &b)
#define sfff(a,b,c) scanf("%lld %lld %lld", &a, &b, &c)

///LOOP
#define rep(x,n) for(__typeof(n) x=0;x<(n);x++)
#define reps(i,x) for(int  i=0;i<(x.size());i++)
#define repp(x,n) for(__typeof(n) x=1;x<=(n);x++)
#define FOR(x,m,n) for(__typeof(n) x=(m);x<=(n);x++)
#define foreach(x,n) for(__typeof(n.begin()) x=n.begin();x!=n.end();x++)

///Shortcut
#define mem(ar,value) memset(ar,value,sizeof(ar))
#define all(x) x.begin(),x.end()
#define Unique(store) store.resize(unique(store.begin(),store.end())-store.begin())
#define sqr(x) ((x)*(x))
#define len(s) s.size()
#define mp make_pair
#define pb push_back
#define xx first
#define yy second

///Min AND Max
#define min4(a,b,c,d) min(min(a,b),min(c,d))
#define max4(a,b,c,d) max(max(a,b),max(c,d))
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))

#define maxall(v) *max_element(all(v))
#define minall(v) *min_element(all(v))

#define inf (1e15)
#define eps (1e-9)
#define PI acos(-1.0)
#define pi 3.14159265358979323846
#define isEq(a,b) (fabs((a)-(b))<eps)
#define Dist(x1,y1,x2,y2) (sqrt(sqr((x1)-(x2))+sqr((y1)-(y2))))
#define spDist(lat1,long1,lat2,long2,r) ((r)*acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos((long1)-(long2))))
#define area(x1,y1,x2,y2,x3,y3) ( x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2) )
#define sqr(x) ((x)*(x))
#define distSqr(x1,y1,x2,y2) ( sqr(x1-x2) + sqr(y1-y2) )
#define dist4adj(x1,y1,x2,y2) ( abs(x1-x2) + abs(y1-y2) )
#define dist8adj(x1,y1,x2,y2) max( abs(x1-x2) , abs(y1-y2) )

///File
#define READ freopen("input.txt","r",stdin)
#define WRITE freopen("output.txt","w",stdout)

/**Define Bitwise operation**/

template<class T> inline T lowbit(T n){return (n^(n-1))&n;}//NOTES:lowbit(
template<class T> inline int countbit(T n){return (n==0)?0:(1+countbit(n&(n-1)));}
#define check(n, pos) (n & (1<<(pos)))
#define biton(n, pos) (n | (1<<(pos)))
#define bitoff(n, pos) (n & ~(1<<(pos)))

#define ledzero(n) (__builtin_clz(n))
#define trailzero(n) (__builtin_ctz(n))
#define onbit(n) (__builtin_popcount(n))

///upper bound and lower bound
#define LB(a,value) (lower_bound(all(a),value)-a.begin())
#define UB(a,value) (upper_bound(all(a),value)-a.begin())

///DEBUG
#define dbg(x) cout<<#x<<": "<<x<<endl
#define dbgar(i,a) cout<<#a<<"["<<i<<"] = "<<a[i]<<" "<<endl

#define trace(x) cerr<<x<<endl;
#define d1(x) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#x" = "<<x<<endl;
#define d2(x,y) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#x" = "<<x<<" | "#y" = "<<y<<endl;
#define d3(x,y,z) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#x" = "<<x<<" | "#y" = "<<y<<" | "#z" = "<<z<<endl;
#define d4(a,b,c,d) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#a" = "<<a<<" | "#b" = "<<b<<" | "#c" = "<<c<<" | "#d" = "<<d<<endl;
#define d5(a,b,c,d,e) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#a" = "<<a<<" | "#b" = "<<b<<" | "#c" = "<<c<<" | "#d" = "<<d<<" | "#e" = "<<e<<endl;
#define d6(a,b,c,d,e,f) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#a" = "<<a<<" | "#b" = "<<b<<" | "#c" = "<<c<<" | "#d" = "<<d<<" | "#e" = "<<e<<" | "#f" = "<<f<<endl;

///Gcd and Lcm
template<class T>T gcd(T a,T b){return b == 0 ? a : gcd(b, a % b);}
template<typename T>T lcm(T a, T b) {return a / gcd(a,b) * b;}

///Bigmod && Pow
template<class T>T my_pow(T n,T p){if(p==0)return 1;T x=my_pow(n,p/2);x=(x*x);if(p&1)x=(x*n);return x;} ///n to the power p
template<class T>T big_mod(T n,T p,T m){if(p==0)return (T)1;T x=big_mod(n,p/2,m);x=(x*x)%m;if(p&1)x=(x*n)%m;return x;}
template<class T> inline T Mod(T n,T m) {return (n%m+m)%m;} ///For Positive Negative No.

template<class T>T multiplication(T n,T p,T m){if(p==0)return (T)0;T x=multiplication(n,p/2,m);x=(x+x)%m;if(p&1)x=(x+n)%m;return x;}
bool isVowel(char ch){ ch=toupper(ch); if(ch=='A'||ch=='U'||ch=='I'||ch=='O'||ch=='E') return true; return false;}

///string to int
template <class T> T extract(string s, T ret) {stringstream ss(s); ss >> ret; return ret;}/// extract words or numbers from a line

template<class T> string itos(T n){ostringstream ost;ost<<n;ost.flush();return ost.str();}///NOTES:toString(
ll stoi(string s){ll r=0;istringstream sin(s);sin>>r;return r;}///NOTES:toInt(
double toDouble(string s){double r=0;istringstream sin(s);sin>>r;return r;}

/**Direction**/
///8 Direction
///int col[8] = {0, 1, 1, 1, 0, -1, -1, -1};int row[8] = {1, 1, 0, -1, -1, -1, 0, 1};
///4 Direction
///int col[4] = {1, 0, -1, 0};int row[4] = {0, 1, 0, -1};
///Knight Direction
///int dx[]={2,1,-1,-2,-2,-1,1,2};int dy[]={1,2,2,1,-1,-2,-2,-1};
///Hexagonal Direction
///int dx[]={-1,-1,+0,+1,+1,+0};int dy[]={-1,+1,+2,+1,-1,-2};
///struct
/*
struct node
{
    ll x,y;
    ll z;
}arr[200005];

bool com(node a, node b)
{
   if(a.x==b.x)return a.y>b.y;
   //else
   return a.x<b.x;
}
*/

typedef   queue <int> qi;
typedef   pair<ll,ll>  pii;
typedef   vector< pii > vpii;
typedef   vector<long long>   vi;
typedef   vector<string>  vs;
typedef   vector<char> vc;
///MAP
typedef   map<string,ll>  msi;
typedef   map<ll,ll>  mii;
typedef   map<char,ll>  mci;
typedef map<char,char>  mcc;

ll a,b,c=0,n,m,r=0,rr=0,f=0,ff=0,ks=0;

string s,ss;

ll dp[505][505];
ll ar[54300];
ll chk(ll aa,ll bb)
{
    ll kk=0,mm=1;
    while(aa)
    {
        if(aa%10==7 or aa%10==4)
        {
            kk=kk+((aa%10)*mm);
            mm*=10;
        }
        aa/=10;
    }
    //if(mm==147)cout<<kk<<" ";
    if(kk==bb)return true;
    else return false;
}

int main()
{
    string s,ss;
    cin>>s>>ss;
    ll aa=count(s.begin(),s.end(),'4');
    ll bb=count(s.begin(),s.end(),'7');
    ll cc=count(ss.begin(),ss.end(),'4');
    ll dd=count(ss.begin(),ss.end(),'7');
    ll diff=0;
    if(aa>cc)
    {
        diff=aa-cc;
    }
    if(bb>dd)
    {
        diff=bb-dd;
    }
    reps(i,s)
    {
        if(s[i]!=ss[i])c++;
    }
    if(c<=diff)
    {
        cout<<diff;return 0;
    }
    diff+=(c/2)+(c%2);
    cout<<diff;

   return 0;

}


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

///Print
#define pf(a)  printf("%lld",a)
#define pff(a,b)  printf("%lld %lld",a,b)
#define pfff(a,b,c)  printf("%lld %lld %lld",a,b,c)
#define nl printf("\n")
#define spc printf(" ")
#define Ca(no) printf("Case %lld: ",++no)
#define Canl(no) printf("Case %lld:\n",++no)
#define Cah(no) printf("Case #%lld: ",++no)
#define Cahnl(no) printf("Case #%lld:\n",++no)

///Scanf
#define sf(n)       scanf("%lld", &n)
#define sff(a,b)    scanf("%lld %lld", &a, &b)
#define sfff(a,b,c) scanf("%lld %lld %lld", &a, &b, &c)

///LOOP
#define rep(x,n) for(__typeof(n) x=0;x<(n);x++)
#define reps(i,x) for(int  i=0;i<(x.size());i++)
#define repp(x,n) for(__typeof(n) x=1;x<=(n);x++)
#define FOR(x,m,n) for(__typeof(n) x=(m);x<=(n);x++)
#define foreach(x,n) for(__typeof(n.begin()) x=n.begin();x!=n.end();x++)

///Shortcut
#define mem(ar,value) memset(ar,value,sizeof(ar))
#define all(x) x.begin(),x.end()
#define Unique(store) store.resize(unique(store.begin(),store.end())-store.begin())
#define sqr(x) ((x)*(x))
#define len(s) s.size()
#define mp make_pair
#define pb push_back
#define xx first
#define yy second

///Min AND Max
#define min4(a,b,c,d) min(min(a,b),min(c,d))
#define max4(a,b,c,d) max(max(a,b),max(c,d))
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))

#define maxall(v) *max_element(all(v))
#define minall(v) *min_element(all(v))

#define inf (1e15)
#define eps (1e-9)
#define PI acos(-1.0)
#define pi 3.14159265358979323846
#define isEq(a,b) (fabs((a)-(b))<eps)
#define Dist(x1,y1,x2,y2) (sqrt(sqr((x1)-(x2))+sqr((y1)-(y2))))
#define spDist(lat1,long1,lat2,long2,r) ((r)*acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos((long1)-(long2))))
#define area(x1,y1,x2,y2,x3,y3) ( x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2) )
#define sqr(x) ((x)*(x))
#define distSqr(x1,y1,x2,y2) ( sqr(x1-x2) + sqr(y1-y2) )
#define dist4adj(x1,y1,x2,y2) ( abs(x1-x2) + abs(y1-y2) )
#define dist8adj(x1,y1,x2,y2) max( abs(x1-x2) , abs(y1-y2) )

///File
#define READ freopen("input.txt","r",stdin)
#define WRITE freopen("output.txt","w",stdout)

/**Define Bitwise operation**/

template<class T> inline T lowbit(T n){return (n^(n-1))&n;}//NOTES:lowbit(
template<class T> inline int countbit(T n){return (n==0)?0:(1+countbit(n&(n-1)));}
#define check(n, pos) (n & (1<<(pos)))
#define biton(n, pos) (n | (1<<(pos)))
#define bitoff(n, pos) (n & ~(1<<(pos)))

#define ledzero(n) (__builtin_clz(n))
#define trailzero(n) (__builtin_ctz(n))
#define onbit(n) (__builtin_popcount(n))

///upper bound and lower bound
#define LB(a,value) (lower_bound(all(a),value)-a.begin())
#define UB(a,value) (upper_bound(all(a),value)-a.begin())

///DEBUG
#define dbg(x) cout<<#x<<": "<<x<<endl
#define dbgar(i,a) cout<<#a<<"["<<i<<"] = "<<a[i]<<" "<<endl

#define trace(x) cerr<<x<<endl;
#define d1(x) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#x" = "<<x<<endl;
#define d2(x,y) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#x" = "<<x<<" | "#y" = "<<y<<endl;
#define d3(x,y,z) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#x" = "<<x<<" | "#y" = "<<y<<" | "#z" = "<<z<<endl;
#define d4(a,b,c,d) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#a" = "<<a<<" | "#b" = "<<b<<" | "#c" = "<<c<<" | "#d" = "<<d<<endl;
#define d5(a,b,c,d,e) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#a" = "<<a<<" | "#b" = "<<b<<" | "#c" = "<<c<<" | "#d" = "<<d<<" | "#e" = "<<e<<endl;
#define d6(a,b,c,d,e,f) cerr<<__FUNCTION__<<":"<<__LINE__<<": "#a" = "<<a<<" | "#b" = "<<b<<" | "#c" = "<<c<<" | "#d" = "<<d<<" | "#e" = "<<e<<" | "#f" = "<<f<<endl;

///Gcd and Lcm
template<class T>T gcd(T a,T b){return b == 0 ? a : gcd(b, a % b);}
template<typename T>T lcm(T a, T b) {return a / gcd(a,b) * b;}

///Bigmod && Pow
template<class T>T my_pow(T n,T p){if(p==0)return 1;T x=my_pow(n,p/2);x=(x*x);if(p&1)x=(x*n);return x;} ///n to the power p
template<class T>T big_mod(T n,T p,T m){if(p==0)return (T)1;T x=big_mod(n,p/2,m);x=(x*x)%m;if(p&1)x=(x*n)%m;return x;}
template<class T> inline T Mod(T n,T m) {return (n%m+m)%m;} ///For Positive Negative No.

template<class T>T multiplication(T n,T p,T m){if(p==0)return (T)0;T x=multiplication(n,p/2,m);x=(x+x)%m;if(p&1)x=(x+n)%m;return x;}
bool isVowel(char ch){ ch=toupper(ch); if(ch=='A'||ch=='U'||ch=='I'||ch=='O'||ch=='E') return true; return false;}

///string to int
template <class T> T extract(string s, T ret) {stringstream ss(s); ss >> ret; return ret;}/// extract words or numbers from a line

template<class T> string itos(T n){ostringstream ost;ost<<n;ost.flush();return ost.str();}///NOTES:toString(
ll stoi(string s){ll r=0;istringstream sin(s);sin>>r;return r;}///NOTES:toInt(
double toDouble(string s){double r=0;istringstream sin(s);sin>>r;return r;}

/**Direction**/
///8 Direction
///int col[8] = {0, 1, 1, 1, 0, -1, -1, -1};int row[8] = {1, 1, 0, -1, -1, -1, 0, 1};
///4 Direction
///int col[4] = {1, 0, -1, 0};int row[4] = {0, 1, 0, -1};
///Knight Direction
///int dx[]={2,1,-1,-2,-2,-1,1,2};int dy[]={1,2,2,1,-1,-2,-2,-1};
///Hexagonal Direction
///int dx[]={-1,-1,+0,+1,+1,+0};int dy[]={-1,+1,+2,+1,-1,-2};
///struct
/*
struct node
{
    ll x,y;
    ll z;
}arr[200005];

bool com(node a, node b)
{
   if(a.x==b.x)return a.y>b.y;
   //else
   return a.x<b.x;
}
*/

typedef   queue <int> qi;
typedef   pair<ll,ll>  pii;
typedef   vector< pii > vpii;
typedef   vector<long long>   vi;
typedef   vector<string>  vs;
typedef   vector<char> vc;
///MAP
typedef   map<string,ll>  msi;
typedef   map<ll,ll>  mii;
typedef   map<char,ll>  mci;
typedef map<char,char>  mcc;

ll a,b,c=0,n,m,r=0,rr=0,f=0,ff=0,ks=0;

string s,ss;

ll dp[505][505];
ll ar[54300];
ll chk(ll aa,ll bb)
{
    ll kk=0,mm=1;
    while(aa)
    {
        if(aa%10==7 or aa%10==4)
        {
            kk=kk+((aa%10)*mm);
            mm*=10;
        }
        aa/=10;
    }
    //if(mm==147)cout<<kk<<" ";
    if(kk==bb)return true;
    else return false;
}

int main()
{
    string s,ss;
    cin>>s>>ss;
    ll aa=count(s.begin(),s.end(),'4');
    ll bb=count(s.begin(),s.end(),'7');
    ll cc=count(ss.begin(),ss.end(),'4');
    ll dd=count(ss.begin(),ss.end(),'7');
    ll diff=0;
    if(aa>cc)
    {
        diff=aa-cc;
    }
    if(bb>dd)
    {
        diff=bb-dd;
    }
    reps(i,s)
    {
        if(s[i]!=ss[i])c++;
    }
    c-=diff;
    if(c>0)
    diff+=(c/2)+(c%2);
    cout<<diff;

   return 0;

}


#include<iostream>
#include<cstdio>
using namespace std;
char str[100005],str1[100005];
void run(){
    int i,n47=0,n74=0;
    for(i=0;str[i];i++){
        if(str[i]!=str1[i]){
            if(str[i]=='4')n47++;
            else n74++;
        }
    }
    printf("%d\n",n47>n74?n47:n74);
}
int main(){
    scanf("%s%s",str,str1);
    run();
    return 0;
}


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

typedef long long ll;
typedef unsigned long long ull;
typedef vector<long long int> vl;
#define PI 3.14159265359

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
    string s1,s2;
    cin>>s1>>s2;
    ll i,n=s1.size(),k[4]={},l=4;
    for(i=0;i<n;i++)
    {
        if(s1[i]=='4')
         k[0]++;
        if(s2[i]=='4')
        k[1]++;
        if(s1[i]=='7')
        k[2]++;
        if(s2[i]=='7')
        k[3]++;
    }
   sort(k,k+l);
    for(i=0;i<4;i++)
    {
        if(k[i]!=0)
        {
            cout<<k[i];
            break;
        }
        //cout<<k[i];
    }

}


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

typedef long long ll;
typedef unsigned long long ull;
typedef vector<long long int> vl;
#define PI 3.14159265359

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
    string s1,s2;
    cin>>s1>>s2;
    ll i,n=s1.size(),k1=0,k2=0,flag=0,cnt=0;
    for(i=0;i<n;i++)
    {
    	if(s1[i]=='4'&&s2[i]=='7')
    		k1++;
    	else if(s1[i]=='7'&&s2[i]=='4')
    		k2++;
    }
    if(k1>=k2)
    {
    	cnt=k2+(k1-k2);
    }
    else
    {
    	cnt=k1+(k2-k1);
    }
    cout<<cnt;

	return 0;
}


//
#include <iostream>
using namespace std;

int main()
{
	int c1=0, c2=0, diff=0, len=0, ans;
	char str1[100001], str2[100001];
	cin>>str1>>str2;

	for(len=0; str1[len]!='\0'; len++);

	for(int i=0; str1[i]!='\0'; i++)
	{
		if(str1[i]=='4')
			c1++;
		if(str2[i]=='4')
			c2++;
	}

	for(int i=0; str1[i]!='\0'; i++)
		if(str1[i]!=str2[i])
			diff++;

	if(c1==c2)
	{
		if(diff==0)
			cout<<"0";
		else
			cout<<diff/2;
	}
	else
	{
		ans=c1-c2>0?c1-c2:c2-c1;
		diff-=ans;
		ans+=diff/2;
		cout<<ans;
	}

	return 0;
}


#include <iostream>
using namespace std;

int main()
{
	int c1=0, c2=0, diff=0;
	char str1[6], str2[6];
	cin>>str1>>str2;

	for(int i=0; str1[i]!='\0'; i++)
	{
		if(str1[i]=='4')
			c1++;
		if(str2[i]=='4')
			c2++;
	}

	for(int i=0; str1[i]!='\0'; i++)
		if(str1[i]!=str2[i])
			diff++;

	if(c1==c2)
	{
		if(diff==0)
			cout<<"0";
		else
			cout<<diff/2;
	}
	else
		cout<<diff;

	return 0;
}


//
#include <iostream>
using namespace std;

int main()
{
	int c1=0, c2=0, diff=0;
	char str1[100001], str2[100001];
	cin>>str1>>str2;

	for(int i=0; str1[i]!='\0'; i++)
	{
		if(str1[i]=='4')
			c1++;
		if(str2[i]=='4')
			c2++;
	}

	for(int i=0; str1[i]!='\0'; i++)
		if(str1[i]!=str2[i])
			diff++;

	if(c1==c2)
	{
		if(diff==0)
			cout<<"0";
		else
			cout<<diff/2;
	}
	else
		cout<<diff;

	return 0;
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C219P3 {

    private static BufferedReader in;
    private static PrintWriter out;
    private static StringTokenizer input;

    public static void main(String[] args) throws IOException {
        //-------------------------------------------------------------------------
        //Initializing...
        new C219P3();
        //-------------------------------------------------------------------------
        //put your code here... :)
        int n = nextInt();
        int [] k = new int[n];
        for (int i = 0; i < k.length; i++) k[i] = nextInt();
        Arrays.sort(k);
        boolean [] cant = new boolean[n];
        int sp = n/2 - 1;int fp = n-1;

        for (sp = n/2 -1; sp >= 0; sp--) {
            if(cant[fp]){fp--;sp++;continue;}
            if(k[fp]>=2*k[sp]){fp--;cant[sp]=true;}
        }

        int count = 0;
        for (int i = 0; i < cant.length; i++) {
            if(!cant[i])count++;
        }

        writeln(""+count);
        //-------------------------------------------------------------------------
        //closing up
        end();
        //--------------------------------------------------------------------------

    }
    public C219P3() throws IOException {
        //Input Output for Console to be used for trying the test samples of the problem
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        //-------------------------------------------------------------------------
        //Initalize Stringtokenizer input
        input = new StringTokenizer(in.readLine());
    }

    private static int nextInt() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Integer.parseInt(input.nextToken());
    }
    private static long nextLong() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Long.parseLong(input.nextToken());
    }
    private static double nextDouble() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Double.parseDouble(input.nextToken());
    }
    private static String nextString() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return input.nextToken();
    }
    private static void write(String output){
        out.write(output);
        out.flush();
    }
    private static void writeln(String output){
        out.write(output+"\n");
        out.flush();
    }
    private static void end() throws IOException{
        in.close();
        out.close();
        System.exit(0);
    }

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class C219P3 {

    private static BufferedReader in;
    private static PrintWriter out;
    private static StringTokenizer input;

    public static void main(String[] args) throws IOException {
        //-------------------------------------------------------------------------
        //Initializing...
        new C219P3();
        //-------------------------------------------------------------------------
        //put your code here... :)
        int n = nextInt();
        int [] k = new int[n];
        for (int i = 0; i < k.length; i++) k[i] = nextInt();
        Arrays.sort(k);
        boolean [] cant = new boolean[n];
        int sp = n/2+(n%2==0?0:-1);int fp = n-1;

        for (sp = n/2; sp >= 0; sp--) {
            if(cant[fp]){fp--;sp++;continue;}
            if(k[fp]>=2*k[sp]){fp--;cant[sp]=true;}
        }

        int count = 0;
        for (int i = 0; i < cant.length; i++) {
            if(!cant[i])count++;
        }

        writeln(""+count);
        //-------------------------------------------------------------------------
        //closing up
        end();
        //--------------------------------------------------------------------------

    }
    public C219P3() throws IOException {
        //Input Output for Console to be used for trying the test samples of the problem
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        //-------------------------------------------------------------------------
        //Initalize Stringtokenizer input
        input = new StringTokenizer(in.readLine());
    }

    private static int nextInt() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Integer.parseInt(input.nextToken());
    }
    private static long nextLong() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Long.parseLong(input.nextToken());
    }
    private static double nextDouble() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Double.parseDouble(input.nextToken());
    }
    private static String nextString() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return input.nextToken();
    }
    private static void write(String output){
        out.write(output);
        out.flush();
    }
    private static void writeln(String output){
        out.write(output+"\n");
        out.flush();
    }
    private static void end() throws IOException{
        in.close();
        out.close();
        System.exit(0);
    }

}


import java.util.Arrays;
import java.util.Scanner;

public class CountingKangaroosIsFun {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int [] nums = new int[n];
        for(int i=0;i<n;i++)
            nums[i]= scan.nextInt();
        Arrays.sort(nums);
        int low = -1;/*
        for(int i=n-2;i>=0;i--)
            if(2*nums[i] <= nums[n-1]) {
                low = i;
                break;
            }*/
        low = (n-1)/2;
        int count =0;
        int high = n-1;
        while(low >= 0 && high > low) {
            if(nums[high] == -1) {high--;continue;}
            if(2*nums[low] <= nums[high]) {
                count++;
                nums[low] = -1;
                high--;
            }
            low--;
        }
        System.out.println(n-count);
        scan.close();
    }

}


import java.util.Arrays;
import java.util.Scanner;

public class CountingKangaroosIsFun {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int [] nums = new int[n];
        for(int i=0;i<n;i++)
            nums[i]= scan.nextInt();
        Arrays.sort(nums);
        int low = -1;
        for(int i=n-2;i>=0;i--)
            if(2*nums[i] <= nums[n-1]) {
                low = i;
                break;
            }
        int count =0;
        int high = n-1;
        while(low >= 0 && high > low) {
            if(nums[high] == -1) {high--;continue;}
            if(2*nums[low] < nums[high]) {
                count++;
                nums[low] = -1;
                high--;
            }
            low--;
        }
        System.out.println(n-count);
        scan.close();
    }

}


import java.util.Arrays;
import java.util.Scanner;

public class CountingKangaroosIsFun {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int [] nums = new int[n];
        for(int i=0;i<n;i++)
            nums[i]= scan.nextInt();
        Arrays.sort(nums);
        int low = -1;
        for(int i=n-2;i>=0;i--)
            if(2*nums[i] <= nums[n-1]) {
                low = i;
                break;
            }
        int count =0;
        int high = n-1;
        while(low >= 0) {
            if(nums[low] == -1) continue;
            if(2*nums[low] < nums[high]) {
                count++;
                nums[low] = -1;
                low--;
                high--;
            }
        }
        System.out.println(n-count);
        scan.close();
    }

}


import java.util.*;

public class C {
  public static void main(String[] ar) {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    int[] a = new int[n];
    for(int i = 0; i < n; ++i) {
        a[i] = in.nextInt();
    }
    Arrays.sort(a);
    int ret = 0;
    for(int j = n/2-1; j >= 0; --j) {
        //System.out.println(a[j]+" "+a[(n-1-ret)]);
        if(a[j]*2 <= a[n-1-ret]) {
            ++ret;
        }
    }
    System.out.println(n-ret);
  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 *
 * @author Aditya Joshi
 */
public class Main
{
    private static int lo = 0;

    private static int[] L;
    public static void main(String[] args)
    {
         MyScanner sc = new MyScanner();
         int n = sc.nextInt();
         L = new int[n];
         for(int i = 0; i < n; i++)  L[i] = sc.nextInt();
         Arrays.sort(L);

         int mid = (n + 1) / 2;

         while(mid < n)
         {
             if(2 * L[lo] <= L[mid++]) lo += 1;
         }

         System.out.println(n - lo);

    }

     public static class MyScanner
       {
      BufferedReader br;
      StringTokenizer st;

      public MyScanner()
      {
         br = new BufferedReader(new InputStreamReader(System.in));
      }

      String next()
      {
          while (st == null || !st.hasMoreElements())
          {
              try
              {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e)
              {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }

      int nextInt()
      {
          return Integer.parseInt(next());
      }

      long nextLong()
      {
          return Long.parseLong(next());
      }

      double nextDouble()
      {
          return Double.parseDouble(next());
      }

      String nextLine()
      {
          String str = "";
	  try
          {
	     str = br.readLine();
	  } catch (IOException e)
          {
	     e.printStackTrace();
	  }
	  return str;
      }

   }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 *
 * @author Aditya Joshi
 */
public class Main
{
    private static int lo = 0;
    private static int hi;
    private static int[] L;
    public static void main(String[] args)
    {
         MyScanner sc = new MyScanner();
         int n = sc.nextInt();
         L = new int[n];
         for(int i = 0; i < n; i++)  L[i] = sc.nextInt();
         Arrays.sort(L);

         int mid = n / 2;

         while(lo < mid && mid < n)
         {
             if(2 * L[lo] <= L[mid]) lo += 1;
             mid += 1;
         }

         System.out.println(n - lo);

    }

     public static class MyScanner
       {
      BufferedReader br;
      StringTokenizer st;

      public MyScanner()
      {
         br = new BufferedReader(new InputStreamReader(System.in));
      }

      String next()
      {
          while (st == null || !st.hasMoreElements())
          {
              try
              {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e)
              {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }

      int nextInt()
      {
          return Integer.parseInt(next());
      }

      long nextLong()
      {
          return Long.parseLong(next());
      }

      double nextDouble()
      {
          return Double.parseDouble(next());
      }

      String nextLine()
      {
          String str = "";
	  try
          {
	     str = br.readLine();
	  } catch (IOException e)
          {
	     e.printStackTrace();
	  }
	  return str;
      }

   }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 *
 * @author Aditya Joshi
 */
public class Main
{
    private static int lo = 0;
    private static int hi;
    private static int[] L;
    public static void main(String[] args)
    {
         MyScanner sc = new MyScanner();
         int n = sc.nextInt();
         L = new int[n];
         for(int i = 0; i < n; i++)  L[i] = sc.nextInt();
         Arrays.sort(L);
         hi = n - 1;
         int mid = (int)Math.ceil((lo + hi) / 2);

         while(lo < mid && mid <= hi)
         {
             if(2 * L[lo] <= L[mid]) lo += 1;
             mid += 1;
         }

         System.out.println(n - lo);

    }

     public static class MyScanner
       {
      BufferedReader br;
      StringTokenizer st;

      public MyScanner()
      {
         br = new BufferedReader(new InputStreamReader(System.in));
      }

      String next()
      {
          while (st == null || !st.hasMoreElements())
          {
              try
              {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e)
              {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }

      int nextInt()
      {
          return Integer.parseInt(next());
      }

      long nextLong()
      {
          return Long.parseLong(next());
      }

      double nextDouble()
      {
          return Double.parseDouble(next());
      }

      String nextLine()
      {
          String str = "";
	  try
          {
	     str = br.readLine();
	  } catch (IOException e)
          {
	     e.printStackTrace();
	  }
	  return str;
      }

   }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 *
 * @author Aditya Joshi
 */
public class Main
{
    private static int lo = 0;
    private static int hi;
    private static int[] L;
    public static void main(String[] args)
    {
         MyScanner sc = new MyScanner();
         int n = sc.nextInt();
         L = new int[n];
         for(int i = 0; i < n; i++)  L[i] = sc.nextInt();
         Arrays.sort(L);

         int mid = (n / 2) - 1;

         while(lo < mid && mid < n)
         {
             if(2 * L[lo] <= L[mid]) lo += 1;
             mid += 1;
         }

         System.out.println(n - lo);

    }

     public static class MyScanner
       {
      BufferedReader br;
      StringTokenizer st;

      public MyScanner()
      {
         br = new BufferedReader(new InputStreamReader(System.in));
      }

      String next()
      {
          while (st == null || !st.hasMoreElements())
          {
              try
              {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e)
              {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }

      int nextInt()
      {
          return Integer.parseInt(next());
      }

      long nextLong()
      {
          return Long.parseLong(next());
      }

      double nextDouble()
      {
          return Double.parseDouble(next());
      }

      String nextLine()
      {
          String str = "";
	  try
          {
	     str = br.readLine();
	  } catch (IOException e)
          {
	     e.printStackTrace();
	  }
	  return str;
      }

   }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 *
 * @author Aditya Joshi
 */
public class Main
{
    private static int lo = 0;
    private static int hi;
    private static int[] L;
    public static void main(String[] args)
    {
         MyScanner sc = new MyScanner();
         int n = sc.nextInt();
         L = new int[n];
         for(int i = 0; i < n; i++)  L[i] = sc.nextInt();
         Arrays.sort(L);
         hi = n - 1;
         int mid = (lo + hi) / 2;
         int cntr = 0;
         while(lo < mid && mid <= hi)
         {
             if(2 * L[lo] <= L[mid]) lo += 1;
             mid += 1;
         }

         System.out.println(n - lo);

    }

     public static class MyScanner
       {
      BufferedReader br;
      StringTokenizer st;

      public MyScanner()
      {
         br = new BufferedReader(new InputStreamReader(System.in));
      }

      String next()
      {
          while (st == null || !st.hasMoreElements())
          {
              try
              {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e)
              {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }

      int nextInt()
      {
          return Integer.parseInt(next());
      }

      long nextLong()
      {
          return Long.parseLong(next());
      }

      double nextDouble()
      {
          return Double.parseDouble(next());
      }

      String nextLine()
      {
          String str = "";
	  try
          {
	     str = br.readLine();
	  } catch (IOException e)
          {
	     e.printStackTrace();
	  }
	  return str;
      }

   }
}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int []kang = new int[n + 1];
        for (int i = 1;i <= n;++i)kang[i] = in.nextInt();
        Arrays.sort(kang);
        int max = kang[n];
        int k = 0;
        for (int i = n - 1;i >= 1;--i){
            int temp = 2*kang[i];
            if (temp <= max){
                k = i;
                break;
            }
        }
        out.print(n - k);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int []kang = new int[n + 1];
        for (int i = 1;i <= n;++i)kang[i] = in.nextInt();
        Arrays.sort(kang);
        boolean []fill = new boolean[n + 1];
        int ress = n;
        int p = n % 2 == 0 ?n / 2:(n+1)/2;
        for (int t = 0;t < 10000000;++t)
        {
            int max = kang[n];
            int k = 0;
            for (int i = p;i >= 1;--i){
                if (fill[i])continue;
                int temp = 2*kang[i];
                if (temp <= max){
                    k = i;
                    break;
                }
            }
            if (k == 0){
                out.print(ress);return;
            }
            p = k - 1;
            fill[k] = true;
            fill[n] = true;
            ress--;
            while (n >= 1 && fill[n])n--;
        }

    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int []kang = new int[n + 1];
        for (int i = 1;i <= n;++i)kang[i] = in.nextInt();
        Arrays.sort(kang);
        boolean []fill = new boolean[n + 1];
        int ress = n;
        int p = n % 2 == 0 ?n / 2:(n+1)/2;
        for (int t = 0;t < 100000;++t)
        {
            int max = kang[n];
            int k = 0;
            for (int i = p;i >= 1;--i){
                if (fill[i])continue;
                int temp = 2*kang[i];
                if (temp <= max){
                    k = i;
                    break;
                }
            }
            if (k == 0){
                out.print(ress);return;
            }
            p = k - 1;
            fill[k] = true;
            fill[n] = true;
            ress--;
            while (n >= 1 && fill[n])n--;
        }

    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int []kang = new int[n + 1];
        for (int i = 1;i <= n;++i)kang[i] = in.nextInt();
        Arrays.sort(kang);
        boolean []fill = new boolean[n + 1];
        for (int t = 0;t < 100000;++t)
        {
            int max = kang[n];
            int k = 0;
            for (int i = n - 1;i >= 1;--i){
                if (fill[i])continue;
                int temp = 2*kang[i];
                if (temp <= max){
                    k = i;
                    break;
                }
            }
            if (k == 0){
                out.print(n);return;
            }
            fill[k] = true;
            n--;
        }

    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int []kang = new int[n + 1];
        for (int i = 1;i <= n;++i)kang[i] = in.nextInt();
        Arrays.sort(kang);
        int max = kang[n];
        int k = n - 1;
        for (int i = n - 1;i >= 1;--i){
            int temp = 2*kang[i];
            if (temp < max){
                k = i;
                break;
            }
        }
        out.print(n - k);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int []kang = new int[n + 1];
        for (int i = 1;i <= n;++i)kang[i] = in.nextInt();
        Arrays.sort(kang);
        boolean []fill = new boolean[n + 1];
        int ress = n;
        for (int t = 0;t < 100000;++t)
        {
            int max = kang[n];
            int k = 0;
            for (int i = n / 2;i >= 1;--i){
                if (fill[i])continue;
                int temp = 2*kang[i];
                if (temp <= max){
                    k = i;
                    break;
                }
            }
            if (k == 0){
                out.print(ress);return;
            }
            fill[k] = true;
            fill[n] = true;
            ress--;
            while (n >= 1 && fill[n])n--;
        }

    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int []kang = new int[n + 1];
        for (int i = 1;i <= n;++i)kang[i] = in.nextInt();
        Arrays.sort(kang);
        boolean []fill = new boolean[n + 1];
        int ress = n;
//        int p = n % 2 == 0 ?n / 2:(n+1)/2;
        int p = n - 1;
        for (int t = 0;t < 10000000;++t)
        {
            int max = kang[n];
            int k = 0;
            for (int i = p;i >= 1;--i){
                if (fill[i])continue;
                int temp = 2*kang[i];
                if (temp <= max){
                    k = i;
                    break;
                }
            }
            if (k == 0){
                out.print(ress);return;
            }
            p = k - 1;
            fill[k] = true;
            fill[n] = true;
            ress--;
            while (n >= 1 && fill[n])n--;
        }

    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int []kang = new int[n + 1];
        for (int i = 1;i <= n;++i)kang[i] = in.nextInt();
        Arrays.sort(kang);
        int max = kang[n];
        int k = n - 1;
        for (int i = n - 1;i >= 1;--i){
            int temp = 2*kang[i];
            if (temp <= max){
                k = i;
                break;
            }
        }
        out.print(n - k);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.util.Scanner;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author balbasaur
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int []kang = new int[n + 1];
        for (int i = 1;i <= n;++i)kang[i] = in.nextInt();
        Arrays.sort(kang);
        boolean []fill = new boolean[n + 1];
        int ress = n;
        for (int t = 0;t < 100000;++t)
        {
            int max = kang[n];
            int k = 0;
            for (int i = n - 1;i >= 1;--i){
                if (fill[i])continue;
                int temp = 2*kang[i];
                if (temp <= max){
                    k = i;
                    break;
                }
            }
            if (k == 0){
                out.print(ress);return;
            }
            fill[k] = true;
            fill[n] = true;
            ress--;
            while (n >= 1 && fill[n])n--;
        }

    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}


import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author maurya
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        int n = in.nextInt();
        int kang [] = new int[n];
        for (int i = 0; i < n; i++) {
            kang[i] = in.nextInt();
        }
        Arrays.sort(kang);
        int res = 0;
        for (int i = 1, j = 0; i < n; i++) {
            if (kang[i] >= kang[j]*2) {
                res++;
                j++;
                kang[i] = 1<<30;
            }

        }
        out.println(n-res);
    }
}


import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author maurya
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }
}

class TaskC {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        int n = in.nextInt();
        int kang[] = new int[n];
        for (int i = 0; i < n; i++) {
            kang[i] = in.nextInt();
        }
        Arrays.sort(kang);
        int i = n, j = n / 2, ans = n;
        while (i > n / 2 && j > 0) {
            if (kang[i - 1] >= 2 * kang[j - 1]) {
                i--;
                ans--;
            }
            j--;
        }
        out.println(ans);
    }
}


import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author maurya
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        int n = in.nextInt();
        int kang [] = new int[n];
        for (int i = 0; i < n; i++) {
            kang[i] = in.nextInt();
        }
        Arrays.sort(kang);
        int res = 0;
        for (int i = 1, j = 0; i < n; i++) {
            if (kang[i] >= kang[j]*2) {
                res++;
                j++;
            }

        }
        out.println(n-res);
    }
}


import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author maurya
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        int n = in.nextInt();
        int kang [] = new int[n];
        for (int i = 0; i < n; i++) {
            kang[i] = in.nextInt();
        }
        Arrays.sort(kang);
        int res = 0;

        for ( int i = n - 1, j = n-2; i >= 0 && j >=0; i--,j--) {
            while(kang[j]*2 > kang[i] && j >= 0) j--;
            if (j>=0) res++;
        }
        out.println(n-res);
    }
}


import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author maurya
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        int n = in.nextInt();
        int kang [] = new int[n];
        for (int i = 0; i < n; i++) {
            kang[i] = in.nextInt();
        }
        Arrays.sort(kang);
        int res = 0;
        for (int i = 1, j = 0; i < n; i++) {
            if (kang[i] > kang[j]*2) {
                res++;
                j++;
            }

        }
        out.println(n-res);
    }
}


import java.util.*;
import java.io.*;

public class C {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();
		int[] size = new int[n];
		int [] size2 = new int[n];
		for(int i=0;i<n;i++){
			size[i] = sc.nextInt();
			size2[i] = size[i]*2;
		}
		sc.close();

		Arrays.sort(size);
		Arrays.sort(size2);
		int p1 = 0;
		int p2 = (n+1)/2;
		int cnt = 0;
		while(p1<size.length && p2<size.length){
			while(p2<size2.length && size[p2]<size2[p1]){
				p2++;
			}
			if(p2<size2.length){
				cnt++;
				p2++;
				p1++;
			}
		}

		out.println(n-cnt);
		out.flush();
	}
}


import java.util.*;
public class maximus {
public static void main(String [] args){
Scanner in=new Scanner(System.in);
int n=in.nextInt();
int array[]=new int[n];
for(int i=0;i<n;i++)array[i]=in.nextInt();
Arrays.sort(array);
int cnt=0;
int ptr=n/2;
for(int i=0;i<n && ptr<n;i++){
if(2*array[i]<=array[ptr])cnt++;
else i--;
ptr++;
}
System.out.println(n-cnt);
}
}


import java.util.*;
public class maximus {
public static void main(String [] args){
Scanner in=new Scanner(System.in);
int n=in.nextInt();
int array[]=new int[n];
for(int i=0;i<n;i++)array[i]=in.nextInt();
Arrays.sort(array);
int cnt=0;
int ptr=(n+1)/2;
for(int i=0;i<n && ptr<n;i++){
if(2*array[i]<=array[ptr])cnt++;
else i--;
ptr++;
}
System.out.println(n-cnt);
}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * Created by 875k on 12/19/13.
 */
public class CF219C {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(br.readLine());
        int[] arr = new int[N];
        for(int i = 0; i < N; i++) {
            arr[i] = -Integer.parseInt(br.readLine());
        }
        Arrays.sort(arr);
        int j = (N + 1) / 2;
        int ct = N;
        for(int i = 0; i < N / 2; i++) {
            while(j < N && (-arr[i]) < (-arr[j]) * 2) j++;
            if(j < N) ct--;
            else break;
            j++;
        }
        System.out.println(ct);
    }
}


import java.io.*;
import java.util.*;

public class Main{

    private void doit(){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt();
            ArrayList<Integer> list = new ArrayList<Integer>();
            for(int i = 0; i < n; i++){
                list.add(sc.nextInt());
            }
            Collections.sort(list);
            if(n == 1){
                System.out.println("1");
                continue;
            }
            int low = 1, hi = n / 2;
            int mid = (low + hi) / 2;
            while(low <= hi){
                mid = (low + hi) / 2;
                if(check(list, mid)){
                    low = mid + 1;
                }
                else{
                    hi = mid - 1;
                }
            }
            System.out.println(n - hi);
        }
    }

    private boolean check(ArrayList<Integer> list, int mid) {
        int ind = mid - 1;
        for(int i = 0; i < mid; i++){
            if(list.get(i) * 2 > list.get(list.size() - 1 - ind + i)){
                return false;
            }
        }
        return true;
    }

    class InStream{
        BufferedReader in;StringTokenizer st;
        public InStream() {
            this.in = new BufferedReader(new InputStreamReader(System.in));
            this.st = null;
        }
        String next() {
            while (st==null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (Exception e) {}
            }
            return st.nextToken();
        }
        boolean hasNext(){
            try{
                st = new StringTokenizer(in.readLine());
                return true;
            }catch(Exception e){return false;}
        }
        int nextInt() { return Integer.parseInt(next());}
        long nextLong() {return Long.parseLong(next());}
        double nextDouble() {return Double.parseDouble(next());}
    }

    private void debug(Object... o) {
        System.out.println("debug = " + Arrays.deepToString(o));
    }

    public static void main(String[] args) {
        new Main().doit();
    }
}


import java.io.*;
import java.util.*;

public class Main{

    private void doit(){
        InStream sc = new InStream();
        while(sc.hasNext()){
            int n = sc.nextInt();
            ArrayList<Integer> list = new ArrayList<Integer>();
            for(int i = 0; i < n; i++){
                list.add(sc.nextInt());
            }
            Collections.sort(list);
            if(n == 1){
                System.out.println("1");
                continue;
            }
            int low = 1, hi = n / 2;
            int mid = (low + hi) / 2;
            while(low <= hi){
                mid = (low + hi) / 2;
                if(check(list, mid)){
                    low = mid + 1;
                }
                else{
                    hi = mid - 1;
                }
            }
            System.out.println(n - hi);
        }
    }

    private boolean check(ArrayList<Integer> list, int mid) {
        int ind = mid - 1;
        int len = list.size() - 1;
        for(int i = 0; i < mid; i++){
            if(list.get(i) * 2 > list.get(len - ind + i)){
                return false;
            }
        }
        return true;
    }

    class InStream{
        BufferedReader in;StringTokenizer st;
        public InStream() {
            this.in = new BufferedReader(new InputStreamReader(System.in));
            this.st = null;
        }
        String next() {
            while (st==null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (Exception e) {}
            }
            return st.nextToken();
        }
        boolean hasNext(){
            try{
                st = new StringTokenizer(in.readLine());
                return true;
            }catch(Exception e){return false;}
        }
        int nextInt() { return Integer.parseInt(next());}
        long nextLong() {return Long.parseLong(next());}
        double nextDouble() {return Double.parseDouble(next());}
    }

    private void debug(Object... o) {
        System.out.println("debug = " + Arrays.deepToString(o));
    }

    public static void main(String[] args) {
        new Main().doit();
    }
}