#include <bits/stdc++.h>
using namespace std;
int n;
string a, b;
int ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> a >> b;
  int res = 0;
  for (int i = 0; i < a.size(); ++i) {
    if (i + 1 < a.size()) {
      if (a[i] != b[i] && a[i + 1] != b[i + 1] &&
          int(a[i] + a[i + 1]) == int(b[i] + b[i + 1])) {
        ++ans;
        swap(a[i], a[i + 1]);
      }
    }
    if (a[i] != b[i]) ++ans, a[i] = b[i];
  }
  cout << ans;
  return 0;
}
