#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 55;
vector<int> adj[MAXN];
bool visited[MAXN];
int dsu[MAXN + 55];
int coin[MAXN];
int i, j;
int a[2000000];
int main() {
  long long n, x = -1, ans = 0;
  string s, t;
  cin >> n >> s >> t;
  for (i = 0; i < n; i++)
    if (s[i] != t[i] && x < 0) {
      if (i != n - 1)
        x = i;
      else
        ans += 1, x = -1;
    } else if (s[i] != t[i] && x >= 0) {
      if (s[i] != s[x]) {
        if (i == x + 1) {
          ans += 1;
          x = -1;
        } else {
          if (i != n - 1) {
            ans += 1;
            x = i;
          } else {
            ans += 2;
            x = -1;
          }
        }
      } else {
        if (i == n - 1)
          ans += 2, x = -1;
        else {
          ans += 1;
          x = i;
        }
      }
    }
  if (i == n && x >= 0) ans += 1;
  cout << ans;
}
