#include<iostream>
#include<string>
using namespace std;
int anagram(const string& lhs, const string& rhs);
int main() {
string s1, s2;
cin >> s1 >> s2;
cout << anagram(s1, s2) << "\n";
}
int anagram(const string& lhs, const string& rhs) {
int result = 0;
int lhsAlphabet[26]{ 0 };
int rhsAlphabet[26]{ 0 };
for (size_t i = 0; i < lhs.size(); i++)
{
lhsAlphabet[static_cast<int>(lhs[i] - 'a')]++;
result++;
}
for (size_t i = 0; i < rhs.size();i++) {
rhsAlphabet[static_cast<int>(rhs[i] - 'a')]++;
result++;
}
for (int i = 0; i < sizeof(lhsAlphabet) / sizeof(int);i++) {
if (lhsAlphabet[i] != 0 && rhsAlphabet[i] != 0) {
{ int common = (lhsAlphabet[i] > rhsAlphabet[i]) ?
rhsAlphabet[i] : lhsAlphabet[i];
result -= common * 2;
}
}
return result;
}