#include <bits/stdc++.h>
using namespace std;
int main() {
  double a[10000], b[10000], h1, h2, n = 5;
  double c[6] = {500, 1000, 1500, 2000, 2500};
  while (cin >> a[0]) {
    for (int i = 1; i < n; i++) cin >> a[i];
    for (int i = 0; i < n; i++) cin >> b[i];
    cin >> h1 >> h2;
    double sum = 0;
    if (h1 >= 0 && h2 >= 0)
      for (int i = 0; i < n; i++)
        sum += (double)((250 - a[i]) * (double)c[i] / (double)250 - 50 * b[i]);
    sum += double(h1 * 100 - h2 * 50);
    printf("%.0lf\n", sum);
  }
  return 0;
}
