#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, con = 0;
  cin >> n;
  string a, b;
  int c[n];
  cin >> a >> b;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] != b[i]) {
      if (a[i + 1] == b[i + 1])
        con++;
      else {
        if (a[i] != a[i + 1]) {
          swap(a[i], a[i + 1]);
          con++;
        } else
          con++;
      }
    }
  }
  if (a[n - 1] != b[n - 1]) con++;
  cout << con;
  return 0;
}
