#include <bits/stdc++.h>
using namespace std;
const int oo = (int)1e9;
const double PI = 2 * acos(0.0);
const double eps = 1e-9;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  long long a[100010], b[100010];
  cin >> n;
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  for (int i = 0; i < (int)(n); i++) cin >> b[i];
  long long sum = 0;
  for (int i = 0; i < (int)(n); i++) {
    if (a[i] * 2 < b[i] || b[i] / 2 == 0) {
      --sum;
      continue;
    }
    sum += (b[i] / 2) * (b[i] - b[i] / 2);
  }
  cout << sum << endl;
  return 0;
}
