#include <bits/stdc++.h>
using namespace std;
int n, ans;
char a[1000006], b[1000006];
bool bonus;
int main() {
  scanf("%d", &n);
  scanf("%s%s", a, b);
  for (int i = 0; i < n; i++) {
    if (a[i] == b[i]) {
      bonus = 0;
      continue;
    }
    ans++;
    if (bonus == 1 && a[i - 1] != a[i]) {
      ans--;
      bonus = 0;
    } else {
      bonus = 1;
    }
  }
  cout << ans << endl;
  return 0;
}
