#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7fffffff;
const int MAXN = +3;
int n, ans;
string a, b;
vector<int> v;
int main() {
  cin >> n >> a >> b;
  for (int i = 0; i < (int)(n); i++) {
    if (a[i] != b[i]) {
      v.push_back(i);
    }
  }
  for (int i = 0; i < (int)(v.size()); i++) {
    if (i != v.size() - 1 && v[i + 1] - v[i] <= 1 && a[v[i + 1]] != a[v[i]]) {
      ans += 1;
      i++;
    } else {
      ans++;
    }
  }
  cout << ans;
  return 0;
}
