#include <bits/stdc++.h>
using namespace std;
void run_case() {
  int n;
  cin >> n;
  string a, b;
  cin >> a >> b;
  int cost = 0;
  for (int i = 0; i < a.length(); ++i) {
    if (a[i] != b[i]) {
      if (i + 1 < n)
        if (i + 1 < a.length()) i += (a[i + 1] != b[i + 1] && a[i] != a[i + 1]);
      ++cost;
    }
  }
  cout << cost << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int tt = 1;
  while (tt--) {
    run_case();
  }
  return 0;
}
