#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using ull = unsigned long long int;
using dd = double;
using ldd = long double;
using si = short int;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string a, b;
  cin >> a >> b;
  ll ans = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] == b[i]) continue;
    ++ans;
    if (i < n - 1) {
      if (a[i + 1] != a[i] && a[i + 1] != b[i + 1]) {
        swap(a[i + 1], a[i]);
      }
    }
  }
  cout << ans;
}
