#include <bits/stdc++.h>
using namespace std;
const double PI = 2 * acos(0.0);
template <typename T>
struct edge {
  int from, to;
  T w;
  edge(int from, int to, T w) : from(from), to(to), w(w) {}
  edge() {}
};
template <class T, class C>
void show(C a) {
  for (T x : a) cout << x << " ";
  cout << endl;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  string a, b;
  cin >> n >> a >> b;
  int ans = 0;
  for (int i = 0; i < n - 1; ++i) {
    if (a[i] != b[i] && a[i + 1] != b[i + 1] && a[i] != a[i + 1]) {
      swap(a[i], a[i + 1]);
      ans++;
    }
  }
  for (int i = 0; i < n; ++i) ans += a[i] != b[i];
  cout << ans;
}
