#include <bits/stdc++.h>
using namespace std;
string S1, S2;
int i, n, solan;
char c;
bool change;
int main() {
  scanf("%d", &n);
  cin >> S1;
  cin >> S2;
  change = false;
  solan = 0;
  for (i = 0; i < n; i++) {
    if ((int(S1[i]) != int(S2[i])) && (change == false))
      change = true;
    else if ((int(S1[i]) != int(S2[i])) && (change == true)) {
      if (int(S1[i]) != int(S1[i - 1])) {
        solan++;
        change = false;
      } else {
        solan++;
      }
    } else if ((int(S1[i]) == int(S2[i])) && (change == true)) {
      change = false;
      solan++;
    }
    if ((change == true) && (i == n - 1)) {
      solan++;
      break;
    }
  }
  printf("%d", solan);
}
