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