#include <bits/stdc++.h>
using namespace std;
string a, b;
signed main() {
  long long n;
  cin >> n;
  cin >> a >> b;
  long long len = a.length(), ans = 0;
  if (a[0] != b[0]) ans++;
  for (long long i = 1; i < len; i++)
    if (a[i] != b[i]) ans++;
  for (long long i = 1; i < len; i++)
    if (a[i] != b[i] && a[i - 1] != b[i - 1] && a[i] == b[i - 1])
      ans--, a[i] = b[i];
  printf("%lld\n", ans);
  return 0;
}
