#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int n;
  cin >> n;
  cin >> a >> b;
  int ans = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] != b[i]) {
      ans++;
      if (a[i + 1] != b[i + 1] && a[i] != a[i + 1]) {
        swap(a[i], a[i + 1]);
      } else
        a[i] = b[i];
    }
  }
  if (a[n - 1] != b[n - 1]) ans++;
  printf("%d\n", ans);
  return 0;
}
