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