#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long i, j, a, n = 0;
  string s, str;
  cin >> a;
  cin >> s >> str;
  for (long long i = 0; i < s.size() - 1; i++) {
    if (s[i] == str[i]) continue;
    if (s[i] != str[i] and s[i + 1] != str[i + 1]) {
      swap(s[i], s[i + 1]);
      n++;
      continue;
    }
    n++;
  }
  if (s[a - 1] != str[a - 1]) n++;
  cout << n;
  return 0;
}
