Rudolf is on his way to the castle. Before getting into the castle, the security staff asked him a question:

Given two binary numbers a and b of length n. How many different ways of swapping two digits in a (only in a, not b) so that bitwise OR of these two numbers will be changed? In other words, let c be the bitwise OR of a and b, you need to find the number of ways of swapping two bits in a so that bitwise OR will not be equal to c.

Note that binary numbers can contain leading zeros so that length of each number is exactly n.

[Bitwise OR](https://en.wikipedia.org/wiki/Bitwise_operation#OR) is a binary operation. A result is a binary number which contains a one in each digit if there is a one in at least one of the two numbers. For example, 01010_2 OR 10011_2 = 11011_2.

Well, to your surprise, you are not Rudolf, and you don't need to help him… You are the security staff! Please find the number of ways of swapping two bits in a so that bitwise OR will be changed.

Input

The first line contains one integer n (2≤ n≤ 10^5) — the number of bits in each number.

The second line contains a binary number a of length n.

The third line contains a binary number b of length n.

Output

Print the number of ways to swap two bits in a so that bitwise OR will be changed.

Examples

Input

5
01011
11001


Output

4


Input

6
011000
010011


Output

6

Note

In the first sample, you can swap bits that have indexes (1, 4), (2, 3), (3, 4), and (3, 5).

In the second example, you can swap bits that have indexes (1, 2), (1, 3), (2, 4), (3, 4), (3, 5), and (3, 6).
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
using VS = vector<string>;
using VB = vector<bool>;
using VVI = vector<VI>;
using VVL = vector<VL>;
using PII = std::pair<int, int>;
using PLL = std::pair<ll, ll>;
using TI3 = std::tuple<int, int, int>;
using TI4 = std::tuple<int, int, int, int>;
using TL3 = std::tuple<ll, ll, ll>;
using TL4 = std::tuple<ll, ll, ll, ll>;
const int mod1 = 1e9 + 7, mod2 = 998244353, mod3 = 1e9 + 9;
const int mod = mod1;
const ll inf = 1e18;
const string wsp = " ";
const string tb = "\t";
const string rt = "\n";
template <typename T>
void show1dvec(const vector<T> &v) {
  if (v.size() == 0) return;
  int n = v.size() - 1;
  for (int i = 0; i < (int)(n); i++) cout << v[i] << wsp;
  cout << v[n] << rt;
  return;
}
template <typename T>
void show2dvec(const vector<vector<T>> &v) {
  int n = v.size();
  for (int i = 0; i < (int)(n); i++) show1dvec(v[i]);
}
template <typename T, typename S>
void show1dpair(const vector<pair<T, S>> &v) {
  int n = v.size();
  for (int i = 0; i < (int)(n); i++)
    cout << v[i].first << wsp << v[i].second << rt;
  return;
}
template <typename T, typename S>
void pairzip(const vector<pair<T, S>> &v, vector<T> &t, vector<T> &s) {
  int n = v.size();
  for (int i = 0; i < (int)(n); i++) {
    t.push_back(v[i].first);
    s.push_back(v[i].second);
  }
  return;
}
template <typename T>
void maxvec(vector<T> &v) {
  T s = v[0];
  int n = v.size();
  for (int i = 0; i < (int)(n - 1); i++) {
    if (s > v[i + 1]) {
      v[i + 1] = s;
    }
    s = v[i + 1];
  }
}
template <typename T, typename S>
bool myfind(T t, S s) {
  return find(t.cbegin(), t.cend(), s) != t.cend();
}
bool check(int y, int x, int h, int w) {
  return 0 <= y && y < h && 0 <= x && x < w;
}
template <typename T>
vector<T> cumsum(const vector<T> &v) {
  T s = 0;
  vector<T> ret;
  for (int i = 0; i < (int)(v.size()); i++) {
    s += v[i];
    s %= mod;
    ret.emplace_back(s);
  }
  return ret;
}
bool iskadomatsu(int a, int b, int c) {
  return (a != b && b != c && c != a) && ((a > b && b < c) || (a < b && b > c));
}
VS split(string s, char c) {
  VS ret;
  string part;
  s += c;
  for (int i = 0; i < (int)(s.length()); i++) {
    if (s[i] == c) {
      ret.emplace_back(part);
      part = "";
    } else if (s[i] != c) {
      part += s[i];
    }
  }
  return ret;
}
string removezero(string &s) {
  string ret;
  for (auto z : s)
    if (z != '0') ret += z;
  return ret;
}
ll sumdigit(ll x) {
  ll ans{0};
  while (x > 0) {
    ans += x % 10;
    x /= 10;
  }
  return ans;
}
template <typename T, typename S, typename R>
ll pow_mod(T p, S q, R mod = 1ll) {
  ll ret = 1, r = p;
  while (q) {
    if (q % 2) ret *= r, ret %= mod;
    r = (r * r) % mod, q /= 2;
  }
  return ret % mod;
}
template <typename T, typename S>
ll pow_no_mod(T p, S q) {
  ll ret = 1, r = p;
  while (q) {
    if (q % 2) ret *= r;
    r = (r * r), q /= 2;
  }
  return ret;
}
void make_frac_tables(VL &frac_list, VL &frac_inv_list) {
  for (int i = 0; i < (int)(frac_list.size() - 1); i++) {
    frac_list[i + 1] *= frac_list[i] * (i + 1);
    frac_list[i + 1] %= mod;
    frac_inv_list[i + 1] *= frac_inv_list[i] * pow_mod(i + 1, mod - 2, mod);
    frac_inv_list[i + 1] %= mod;
  }
}
ll comb(int a, int b, const VL &frac_list, const VL &frac_inv_list) {
  if (a < b) return 0;
  ll ret = frac_list[a];
  ret *= frac_inv_list[b];
  ret %= mod;
  ret *= frac_inv_list[a - b];
  ret %= mod;
  return ret;
}
const int l = -2e9 - 10;
const int r = 2e9 + 10;
template <typename T>
void coordinate_compress(vector<T> &x, map<T, int> &zip, int &xs) {
  x.emplace_back(l), x.emplace_back(r);
  sort(x.begin(), x.end());
  x.erase(unique(x.begin(), x.end()), x.end());
  xs = x.size();
  for (int i = 0; i < xs; i++) {
    zip[x[i]] = i;
  }
}
void cumsum_2d(VVL &field, int h, int w) {
  ll s;
  for (int i = 0; i < (int)(h); i++) {
    s = 0;
    for (int j = 0; j < (int)(w); j++) {
      s += field[i][j];
      field[i][j] = s;
    }
  }
  for (int j = 0; j < (int)(w); j++) {
    s = 0;
    for (int i = 0; i < (int)(h); i++) {
      s += field[i][j];
      field[i][j] = s;
    }
  }
}
void shave(vector<int> &v, int n) {
  vector<int> x, y;
  int n_sq = sqrt(n) + 1;
  for (int i = 3; i < n + 1; i += 2) {
    x.emplace_back(i);
  }
  for (int i = 3; i < n_sq; i += 2) {
    for (auto itr = x.begin(); itr != x.end(); itr++) {
      if (*itr == i || *itr % i != 0) y.emplace_back(*itr);
    }
    x.clear();
    x = y;
    y.clear();
  }
  if (n >= 2) x.insert(x.begin(), 2);
  for (auto itr = x.begin(); itr != x.end(); itr++) {
    v.emplace_back(*itr);
  }
}
struct road {
  int from;
  int to;
  int time;
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  ll ans{0};
  cin >> n;
  string s, t;
  cin >> s >> t;
  VVI bits_list(n);
  VI bits(4, 0);
  for (int i = (int)(n)-1; i >= 0; i--) {
    if (s[i] == t[i] && s[i] == '0') bits[0]++;
    if (s[i] != t[i] && s[i] == '0') bits[1]++;
    if (s[i] != t[i] && s[i] == '1') bits[2]++;
    if (s[i] == t[i] && s[i] == '1') bits[3]++;
    bits_list[i] = bits;
  }
  for (int i = 0; i < (int)(n - 1); i++) {
    if (s[i] == t[i] && s[i] == '0')
      ans += bits_list[i + 1][3] + bits_list[i + 1][2];
    if (s[i] != t[i] && s[i] == '0') ans += bits_list[i + 1][2];
    if (s[i] != t[i] && s[i] == '1')
      ans += bits_list[i + 1][1] + bits_list[i + 1][0];
    if (s[i] == t[i] && s[i] == '1') ans += bits_list[i + 1][0];
  }
  cout << ans << rt;
  return 0;
}
