#include <bits/stdc++.h>
using namespace std;
char a[2000005], b[2000005];
int main() {
  int n;
  cin >> n;
  cin >> a >> b;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] != b[i]) {
      if (a[i + 1] != b[i + 1] && i + 1 < n && a[i] != a[i + 1]) {
        a[i + 1] = '0';
        b[i + 1] = '0';
        ans++;
      } else
        ans++;
    }
  }
  cout << ans << endl;
}
