#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long ans = 0;
  string a, b;
  cin >> a >> b;
  for (long long i = 0; i < n; i++) {
    if (i + 1 < n && a[i] != b[i] && a[i + 1] != b[i + 1] && a[i] != a[i + 1]) {
      ans += 1;
      i++;
    } else if (a[i] != b[i]) {
      ans++;
    }
  }
  cout << ans;
}
