#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int grand(int x) { return uniform_int_distribution<int>(0, x - 1)(rng); }
const int maxn = 1e6 + 7;
const long long inf = 1e15;
const long long md = 1e9 + 7;
int main() {
  {
    ios ::sync_with_stdio(false);
    cin.tie(0);
  };
  int n;
  cin >> n;
  string s, t;
  cin >> s >> t;
  bool op = false;
  int k = -1;
  int ch = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] != t[i]) {
      ch++;
      if (op && k != s[i]) {
        op = false;
        ch -= 2;
        ans += 1;
      } else {
        op = true;
        k = s[i];
      }
    } else {
      op = false;
    }
  }
  cout << ans + ch << endl;
}
