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