#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int n; cin >> n;
string a,b; cin >> a >> b;
int result=0;
for(int i=0;i<n;++i) {
if(a[i]==b[i]) continue;
int j=i;
for(;j<n;++j) {
if(a[j]!=b[j]) continue;
else break;
}
i=j;
++result;
}
cout << result << "\n";
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKICAgIGludCBuOyBjaW4gPj4gbjsgCiAgICBzdHJpbmcgYSxiOyBjaW4gPj4gYSA+PiBiOwogICAgaW50IHJlc3VsdD0wOwogICAgZm9yKGludCBpPTA7aTxuOysraSkgewogICAgICAgIGlmKGFbaV09PWJbaV0pIGNvbnRpbnVlOwogICAgICAgIGludCBqPWk7CiAgICAgICAgZm9yKDtqPG47KytqKSB7CiAgICAgICAgICAgIGlmKGFbal0hPWJbal0pIGNvbnRpbnVlOwogICAgICAgICAgICBlbHNlIGJyZWFrOwogICAgICAgIH0KICAgICAgICBpPWo7CiAgICAgICAgKytyZXN1bHQ7CiAgICB9CiAgICBjb3V0IDw8IHJlc3VsdCA8PCAiXG4iOwoJcmV0dXJuIDA7Cn0=