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