#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n;
char a[N], b[N];
int main() {
  scanf("%d", &n);
  scanf("%s", a + 1);
  scanf("%s", b + 1);
  int ans = 0;
  for (int i = 1; i < n; i++) {
    if ((a[i] != b[i]) && (a[i] != a[i + 1]) && (a[i + 1] != b[i + 1]) &&
        (b[i] != b[i + 1])) {
      ans++;
      a[i] = b[i];
      a[i + 1] = b[i + 1];
    }
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] != b[i]) ans++;
  }
  printf("%d", ans);
  return 0;
}
