import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);
//aryread!string();
//auto PS = new Tuple!(long,string)[](M);
//x[]=1;でlong[]全要素1に初期化
void main()
{
    auto n = lread();
    auto s = sread();
    auto t = sread();
    if (s == t)
    {
        writeln(s.length);
        return;
    }
    long cnt;
    foreach (i; 0 .. n)
    {
        foreach (j; 0 .. n)
        {
            if (s[i] == t[j])
            {
                // writeln(s[i]);
                cnt += 1;
            }
        }
    }
    // writeln(cnt);
    writeln((s.length + t.length) - cnt);

}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}

void arywrite(T)(T a)
{
    a.map!text.join(' ').writeln;
}
