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