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