import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

void main() {
    auto N = readln.chomp.to!int;
    auto A = readln.chomp;
    auto B = readln.chomp;
    long ans = 0;

    for (int i = 0; i < N; ++i) {
        if (A[i] == B[i]) continue;
        if (i == N - 1) {
            ans += 1;
        } else if (A[i+1] != B[i+1] && A[i] != A[i+1]) {
            ans += 1;
            i += 1;
        } else {
            ans += 1;
        }
    }

    ans.writeln;
}
