#include <bits/stdc++.h>
using namespace std;
void swap(char &a, char &b) {
  char temp = a;
  a = b;
  b = temp;
}
long long int cost(string a, string s) {
  long long int count = 0;
  for (int i = 0; i < a.length();) {
    if (a[i] != s[i]) {
      if (a[i] != a[i + 1]) {
        swap(a[i], a[i + 1]);
        i += 2;
        count++;
      } else {
        a[i] = s[i];
        i++;
        count++;
      }
    } else {
      i++;
    }
  }
  return count;
}
int main() {
  long long int n;
  cin >> n;
  string a, b;
  cin >> a >> b;
  cout << cost(a, b);
}
