#include <bits/stdc++.h>
using namespace std;
const int LIM = 1e5;
const int INF = 1e9;
const long long INF64 = 1e18;
const int MOD = INF + 7;
const double EPS = 1e-9;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  string a, b;
  cin >> n;
  cin >> a >> b;
  int ans = 0;
  a = a + "6";
  b = b + "6";
  for (int i = 0; i < n; i++)
    if (a[i] != b[i])
      if (a[i + 1] == b[i] && b[i + 1] == a[i]) {
        swap(a[i], a[i + 1]);
        ans++;
      } else
        ans++;
  cout << ans;
  return 0;
}
