#include<bits/stdc++.h>
using namespace std;
int tab[5][5];
int licz=0;
int t;
int conv(char a)
{
    if(a=='A')
        return 0;
    if(a=='C')
        return 1;
    if(a=='G')
        return 2;
    if(a=='T')
        return 3;
}
int suma(int a)
{
    int licz=0;
    for(int x=0;x<4;x++)
        if(a!=x)
            licz+=tab[a][x];
    return licz;
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    string a,b;
    cin>>a>>b;
    for(int x=0;x<a.size();x++)
        if(a[x]!=b[x])
        {
            tab[conv(a[x])][conv(b[x])]++;
            t++;
        }
    while(t!=0)
    {
        for(int x=0;x<4;x++)
            for(int y=x+1;y<4;y++)
                while(tab[x][y]>0&&tab[y][x]>0)
                {
                    tab[x][y]--;
                    tab[y][x]--;
                    licz++;
                    t-=2;
                }
        for(int x=0;x<4;x++)
        {
            int licz2=0;
            for(int y=0;y<4;y++)
                if(y!=x)
                    licz2+=tab[x][y];
            if(licz2!=0)
            {
                int ok,nieok;
                for(int y=0;y<4;y++)
                    if(y!=x)
                    {
                        if(tab[x][y]==0&&suma(y)>0)
                            nieok=y;
                        else if(tab[x][y]!=0)
                            ok=y;
                    }
                //cout<<ok<<" "<<nieok<<'\n';
                tab[x][ok]--;
                tab[nieok][x]--;
                licz++;
                tab[nieok][ok]++;
                t--;
                break;
            }
        }
    }
    cout<<licz;
    return 0;
}

