#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  string s, t;
  cin >> n >> s >> t;
  long long ans = 0;
  for (int i = 0; i < (int)s.length() - 1; i++) {
    if (s[i] != t[i] && s[i + 1] != t[i + 1] && s[i] != s[i + 1]) {
      ans++;
      swap(s[i], s[i + 1]);
    }
  }
  for (int i = 0; i < s.length(); i++) ans += (s[i] != t[i]);
  cout << ans;
  return 0;
}
