#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9 + 7;
const long long base = 331;
const long long non = 1e18 + 7;
const double pi = 3.1415926536;
template <typename type>
inline void read(type& in) {
  bool negative = false;
  char c;
  for (c = getchar(); c<'0' | c> '9'; c = getchar())
    if (c == '-') negative = true;
  in = c - '0';
  for (c = getchar(); c >= '0' && c <= '9'; c = getchar())
    in = in * 10 + c - '0';
  if (negative) in = -in;
}
template <typename type>
inline void write(type out) {
  if (out < 0) {
    putchar('-');
    out = -out;
  }
  type p = 1;
  for (type tmp = out / 10; tmp > 0; tmp /= 10) p *= 10;
  for (; p > 0; out %= p, p /= 10) putchar(out / p + '0');
}
int n;
string a, b;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  cin >> a;
  cin >> b;
  a = ' ' + a;
  b = ' ' + b;
  int x = 1;
  int res = 0;
  while (x <= n)
    if (a[x] != b[x]) {
      if (x + 1 <= n && a[x] != b[x] && a[x] != a[x + 1]) {
        res++;
        x += 2;
      } else {
        res++;
        x++;
      }
    } else
      x++;
  cout << res;
}
