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