#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, c = 0;
  vector<int> v;
  cin >> n;
  string s1, s2;
  cin >> s1 >> s2;
  for (int i = 0; i < n; i++) {
    if (s1[i] != s2[i]) {
      v.push_back(i);
    }
  }
  if (!v.empty()) {
    sort(v.begin(), v.end(), greater<int>());
    for (int i = 0; i < v.size() - 1; i++) {
      if (s1[v[i]] != s1[v[i + 1]] && v[i] - v[i + 1] == 1) {
        c += v[i] - v[i + 1];
        v[i] = -1;
        v[i + 1] = -1;
        i++;
      } else {
        c++;
        v[i] = -1;
      }
    }
    if (v[v.size() - 1] != -1) c++;
    if (v.size() == 1 || v.size() <= c)
      cout << v.size() << endl;
    else
      cout << c << endl;
  } else
    cout << c << endl;
}
