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