#include <bits/stdc++.h>
int main() {
  long long int n, i, joy = 0;
  scanf("%lld", &n);
  long long int arr[n], brr[n];
  for (i = 0; i < n; i++) {
    scanf("%lld", &arr[i]);
  }
  for (i = 0; i < n; i++) {
    scanf("%lld", &brr[i]);
  }
  for (i = 0; i < n; i++) {
    if (2 * arr[i] < brr[i] || (brr[i] == 1))
      joy--;
    else {
      joy += (long long int)(ceil(brr[i] / 2.0)) *
             (long long int)(floor(brr[i] / 2.0));
    }
  }
  printf("%lld", joy);
}
