#include <bits/stdc++.h>
const int mx = 1e6 + 5;
const int MAX = 1e6;
using namespace std;
long long a[300050], m, i, t, k, ev = 0, od = 0, tt = 0, n, cas = 1,
                                 cum[300050];
vector<int> G[MAX];
const int N = 1e6 + 100;
long long dp[N][2], h[N][2];
int main() {
  ios::sync_with_stdio(true);
  cin.tie(0);
  int n, a[200];
  cin >> n;
  string s, t;
  cin >> s >> t;
  int zero = 0, one = 0, tm = 0, ans = 0;
  if (n == 1) {
    if (s[0] == t[0])
      cout << "0" << endl;
    else
      cout << "1" << endl;
    return 0;
  }
  string str = s;
  for (int i = 0; i < n; i++) {
    if (s[i] != t[i]) {
      if (i < n - 1 && s[i + 1] == t[i] && s[i] == t[i + 1])
        ans++, i++;
      else
        ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
