#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  long long cnt1, cnt2, cnt3, cnt4;
  cnt1 = cnt2 = cnt3 = cnt4 = 0;
  string str1, str2;
  scanf("%d", &n);
  getchar();
  cin >> str1 >> str2;
  for (int i = 0; str1[i] != '\0'; i++) {
    if (str1[i] == '0' && str2[i] == '1')
      cnt1++;
    else if (str1[i] == '1' && str2[i] == '1')
      cnt2++;
    else if (str1[i] == '0' && str2[i] == '0')
      cnt3++;
    else if (str1[i] == '1' && str2[i] == '0')
      cnt4++;
  }
  long long sum = cnt4 * cnt1 + cnt2 * cnt3 + cnt4 * cnt3;
  printf("%I64d", sum);
  return 0;
}
