#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const int INF = 0x3f3f3f3f;
const double EPS = 1e-9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string a, b;
  cin >> a;
  cin >> b;
  long long int ans = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] == b[i + 1] && a[i + 1] == b[i] && a[i] != b[i] &&
        a[i + 1] != b[i + 1] && i < n) {
      ans++;
      i++;
    } else if (a[i] != b[i])
      ans++;
  }
  cout << ans << "\n";
  return 0;
}
