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