#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string a, b;
  cin >> a >> b;
  int beda = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] != b[i]) beda++;
  }
  int ttg = 0;
  for (int i = 0; i < a.length() - 1; i++) {
    if (a[i] == b[i]) continue;
    if (a[i + 1] != b[i + 1] && a[i] != a[i + 1]) {
      ttg++;
      i++;
    }
  }
  cout << beda - ttg << endl;
  return 0;
}
