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