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