#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  string x, y;
  cin >> x >> y;
  long long i = 0;
  long long ans = 0;
  long long dp[n + 10];
  memset(dp, 0, sizeof dp);
  if (x[0] != y[0]) dp[0] = 1;
  for (int i = 1; i < n; i++) {
    if (x[i] != y[i]) {
      if (x[i - 1] != y[i - 1] && x[i] != x[i - 1]) {
        dp[i] = 1;
        dp[i - 1] = 0;
        char ch = x[i - 1];
        char ch1 = x[i];
        x[i] = ch;
        x[i - 1] = ch1;
      } else
        dp[i] = 1;
    }
  }
  for (int i = 0; i < n; i++) {
    ans += dp[i];
  }
  cout << ans;
  return 0;
}
