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