#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long mod) {
  long long c = 1;
  while (b > 0) {
    if (b % 2) c *= a, c %= mod;
    b /= 2;
    a *= a;
    a %= mod;
  }
  return c;
}
const long long N = (1e5) + 10;
const long long M = 320;
const long long Mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << setprecision(25);
  long long n, k, j, c, r;
  long long t;
  cin >> n;
  string a, b;
  long long ans = 0;
  cin >> a >> b;
  for (int i = 0; i < n; i++) {
    if (a[i] == b[i]) continue;
    if (i < n - 1 && a[i] == b[i + 1] && a[i + 1] == b[i]) {
      ans++;
      i++;
      continue;
    }
    ans++;
  }
  cout << ans;
  return 0;
}
