#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  string s, ss;
  cin >> s;
  cin >> ss;
  long long c = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] != ss[i]) {
      if (i < n - 1) {
        if (s[i + 1] != ss[i + 1]) {
          if (ss[i + 1] == s[i] && s[i + 1] == ss[i]) i++;
        }
      }
      c++;
    }
  }
  cout << c << endl;
}
