#include <bits/stdc++.h>
using namespace std;
char s1[1001000], s2[1100001];
int main() {
  int n, ans = 0;
  cin >> n;
  scanf("%s", s1 + 1);
  scanf("%s", s2 + 1);
  for (int i = 1; i <= n; i++) {
    if (s1[i] == s2[i]) continue;
    if (s1[i] != s2[i] && s1[i + 1] != s2[i + 1] && s1[i] != s1[i + 1])
      ans++, i++;
    else
      ans++;
  }
  cout << ans << endl;
}
