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