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