#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
struct data {
  int pos, need;
} q[N];
int p = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  string a, b;
  cin >> a >> b;
  for (int i = 0; i < n; ++i) {
    if (a[i] != b[i]) {
      q[p].pos = i;
      q[p].need = b[i] - a[i];
      p++;
    }
  }
  int ans = 0, i;
  for (i = 0; i < p - 1;) {
    if (q[i].need == q[i + 1].need) {
      ans++;
      i++;
    } else {
      if (q[i + 1].pos - q[i].pos == 1) {
        ans++;
        i += 2;
      } else {
        ans++;
        i++;
      }
    }
  }
  if (i == p - 1) ans++;
  cout << ans;
  return 0;
}
