#include <bits/stdc++.h>
using namespace std;
int main() {
  double a[10] = {0}, b[10] = {0};
  double c[10] = {500, 1000, 1500, 2000, 2500};
  for (int i = 0; i < 5; i++) cin >> a[i];
  for (int i = 0; i < 5; i++) cin >> b[i];
  double r, k;
  cin >> r >> k;
  double sum = 0;
  r *= 100;
  k *= 50;
  for (int i = 0; i < 5; i++) {
    sum += max(0.3 * c[i], (1 - (a[i] / 250)) * c[i] - (50 * b[i]));
  }
  sum += r;
  sum -= k;
  cout << (int)sum;
  return 0;
}
