#include <bits/stdc++.h>
using namespace std;
int N;
string A;
string B;
int main() {
  ios_base::sync_with_stdio(NULL);
  cout.tie(NULL);
  cin.tie(NULL);
  cin >> N;
  cin >> A >> B;
  int answer = 0;
  for (int i = 0; i < N - 1; ++i) {
    if (A[i] == B[i]) continue;
    if (A[i + 1] == B[i] && A[i] == B[i + 1])
      swap(A[i], A[i + 1]);
    else
      A[i] = B[i];
    ++answer;
  }
  if (A[N - 1] != B[N - 1]) {
    ++answer;
    A[N - 1] = B[N - 1];
  }
  cerr << A << endl;
  cout << answer << endl;
  return 0;
}
