#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
const long long int N = 5e5;
void solve() {
  long long int n;
  cin >> n;
  string A;
  cin >> A;
  string B;
  cin >> B;
  long long int ans = 0;
  for (long long int i = 0; i < n; ++i) {
    if (i + 1 < n && A[i] != B[i] && A[i + 1] != B[i + 1] && A[i] == B[i + 1] &&
        A[i + 1] == B[i]) {
      ans++;
      i++;
    } else if (A[i] != B[i]) {
      ans++;
    }
  }
  cout << ans << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
