#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000010;
int n, ans = 0;
char ch[maxn], st[maxn];
int main() {
  scanf("%d", &n);
  scanf("%s", ch + 1);
  scanf("%s", st + 1);
  for (int i = 1; i < n; i++) {
    if (ch[i] == st[i]) continue;
    if (ch[i] != st[i] && ch[i + 1] != st[i + 1] && ch[i] != ch[i + 1]) {
      ch[i] = st[i];
      ch[i + 1] = st[i + 1];
      ans++;
    } else
      ch[i] = st[i], ans++;
  }
  if (ch[n] != st[n]) ans++;
  printf("%d", ans);
  return 0;
}
