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