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