#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string s, t;
  cin >> s >> t;
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == t[i]) {
      continue;
    }
    if (i < n - 1 && s[i + 1] == t[i] && s[i] == t[i + 1]) {
      ++cnt;
      swap(s[i], s[i + 1]);
    } else {
      ++cnt;
    }
  }
  cout << cnt << "\n";
}
