#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s, t;
  cin >> s;
  cin >> t;
  int cost = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != t[i]) {
      if (s[i + 1] != t[i + 1] and s[i] != s[i + 1]) {
        swap(s[i], s[i + 1]);
        i++;
        cost += 1;
      } else {
        cost += 1;
      }
    }
  }
  cout << cost << endl;
  return 0;
}
