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