#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  char a[1000001];
  char b[1000001];
  scanf("%s", a);
  scanf("%s", b);
  int i;
  int answer = 0;
  for (i = 0; i < n - 1; i++) {
    if (a[i] != b[i] && a[i + 1] != b[i + 1] && a[i] != a[i + 1]) {
      answer++;
      a[i] = b[i];
      a[i + 1] = b[i + 1];
    }
  }
  for (i = 0; i < n; i++) {
    if (a[i] != b[i]) {
      answer++;
    }
  }
  printf("%d\n", answer);
  return 0;
}
