#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, ans = 0;
  cin >> n;
  string s1, s2;
  cin >> s1 >> s2;
  if (n == 1) {
    if (s1[0] != s2[0])
      ans = 1;
    else
      ans = 0;
    cout << ans;
    return 0;
  }
  for (long long i = 0; i < n; ++i) {
    if (i <= n - 2 && s1[i] != s2[i] && s1[i + 1] != s2[i + 1] &&
        s1[i] == s2[i + 1] && s1[i + 1] == s2[i]) {
      swap(s1[i], s2[i + 1]);
      ans++;
      i++;
    } else {
      if (s1[i] != s2[i]) {
        s1[i] = s2[i];
        ans++;
      }
    }
  }
  cout << ans;
  return 0;
}
