#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, i, count = 0;
  cin >> n;
  string a, b;
  cin >> a >> b;
  for (i = 0; i < n; i++) {
    if (a[i] == b[i])
      continue;
    else {
      if ((a[i] != b[i]) && (a[i + 1] != b[i + 1]) && (a[i] != a[i + 1])) {
        swap(a[i], a[i + 1]);
        count++;
      } else
        count++;
    }
  }
  cout << count << '\n';
  return 0;
}
