#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:167772160000")
template <typename T>
using min_heap = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template <typename T>
using max_heap = std::priority_queue<T, std::vector<T>, std::less<T>>;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string a, b;
  cin >> a >> b;
  int ans = 0;
  for (int i = (0); i < (n); i++) {
    if (a[i] == b[i]) continue;
    if (i == n - 1) {
      ans++;
      continue;
    }
    if (a[i] == b[i + 1] && b[i] == a[i + 1]) {
      ans++;
      swap(a[i], a[i + 1]);
    } else {
      ans++;
    }
  }
  cout << ans;
  return 0;
}
