#include <bits/stdc++.h>
using namespace std;
long long n;
string s, t;
vector<long long> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> s >> t;
  for (long long i = 0; i < n; i++)
    if (s[i] != t[i]) v.push_back(i);
  long long sum = 0;
  long long ans = 0;
  if (v.size() == 1) {
    cout << 1;
    return 0;
  }
  long long flag = 0;
  for (long long i = 0; i < v.size(); i++) {
    if (!flag) {
      if (i != v.size() - 1 && s[v[i]] != s[v[i + 1]] &&
          abs(v[i] - v[i + 1]) == 1)
        sum++, flag = 1;
      else
        sum++;
    } else {
      flag = 0;
      continue;
    }
  }
  cout << sum;
  return 0;
}
