#include <bits/stdc++.h>
using namespace std;
string a, b;
int len = 0;
int ans = 0;
int main() {
  cin >> len >> a >> b;
  for (int i = 0; i < len; i++) {
    if (a[i] != a[i + 1] && a[i] == b[i + 1] && a[i + 1] == b[i]) {
      swap(a[i], a[i + 1]);
      ++ans;
      continue;
    }
    if (a[i] != b[i]) {
      a[i] = b[i];
      ++ans;
    }
  }
  cout << ans << endl;
  return 0;
}
