#include<bits/stdc++.h>
#define FOR(i,b,e) for(int i = b; i<=e; i++)
#define SIZE(x) ((int)(x).size())

using namespace std;

const int maxn = 1000042;
const int INF = 1000000001;

int goal[maxn];
int act[maxn];

map<char, int> ma = {
	{'A', 0},
	{'C', 1},
	{'G', 2},
	{'T', 3},
};

void gooderase(vector<int> &v, int p)
{
	swap(v.back(), v[p]);
	v.pop_back();
}

int pos[4][4];

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

	string gg, aa;
	cin >> gg >> aa;

	int n = SIZE(gg);

	FOR(i, 0, SIZE(gg)-1)
	{
		goal[i+1] = ma[gg[i]];
		act[i+1] = ma[aa[i]];
	}
	

	FOR(i, 1, n)
	{
		if(goal[i] != act[i])
		{
			pos[goal[i]][act[i]]++;
		}
	}

	int ans = 0;

	FOR(i, 0, 3)
		FOR(j, 0, 3)
			if(i != j)
			{
				int toe = min(pos[i][j], pos[j][i]);
				pos[i][j] -= toe;
				pos[j][i] -= toe;
				ans += toe;
			}
	FOR(i, 0, 3)
		FOR(j, 0, 3)
			FOR(k, 0, 3)
				if(i != j && j != k && k != i)
				{
					int toe = min({pos[i][j], pos[j][k], pos[k][i]});
					pos[i][j] -= toe;
					pos[j][k] -= toe;
					pos[k][i] -= toe;
					ans += 2*toe;
				}
	int left = 0;
	FOR(i, 0, 3)
		FOR(j, 0, 3)
			if(i != j)
				left += pos[i][j];

	assert(left % 4 == 0);
	ans += (left / 4) * 3;

	cout << ans << '\n';
}



