#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long INF = pow(10, 18) + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string zz, qq;
  cin >> zz >> qq;
  vector<pair<int, char>> cg;
  for (int i = 0; i < n; i++) {
    if (zz[i] != qq[i]) cg.push_back(make_pair(i, qq[i]));
  }
  int final_ans = 0;
  int len = cg.size();
  vector<bool> chk(len, false);
  for (int i = 0; i < len - 1; i++) {
    if (cg[i].first + 1 == cg[i + 1].first &&
        cg[i].second != cg[i + 1].second) {
      final_ans += 1;
      chk[i] = true;
      chk[i + 1] = true;
      i++;
    }
  }
  final_ans += count(chk.begin(), chk.end(), false);
  cout << final_ans << "\n";
  return 0;
}
