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