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