#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e6 + 10;
char s1[maxn], s2[maxn];
int main() {
  std::ios::sync_with_stdio(false);
  int l;
  cin >> l >> s1 >> s2;
  int ans = 0;
  for (int i = 0; i < l; i++) {
    if (s1[i] != s2[i]) {
      if (i == l - 1) {
        ans++;
      } else {
        if (s1[i + 1] != s2[i + 1] && s1[i] == s2[i + 1]) {
          ans++;
          i++;
        } else
          ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
