#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long int pow1(long long int a, long long int b) {
  if (a == 0) return 0;
  if (a == 1 || b == 0) return 1;
  if (b == 1) return a;
  long long int ans = pow1(a, b / 2) * pow1(a, b / 2);
  if (b % 2 == 1) ans *= a;
  return ans;
}
int main() {
  long long int n;
  cin >> n;
  string s1, s2;
  cin >> s1 >> s2;
  long long int i = 0, ans = 0;
  while (i < n) {
    if (s1[i] == s2[i])
      i++;
    else if (i <= n - 2 && s1[i] == s2[i + 1] && s1[i + 1] == s2[i]) {
      ans += 1;
      i += 2;
    } else {
      ans += 1;
      i++;
    }
  }
  cout << ans << '\n';
}
