#include <bits/stdc++.h>
using namespace std;
void run() {
  vector<int> x(5);
  vector<int> w(5);
  int hx, hw;
  cin >> x[0] >> x[1] >> x[2] >> x[3] >> x[4];
  cin >> w[0] >> w[1] >> w[2] >> w[3] >> w[4];
  cin >> hx >> hw;
  int sum = 0;
  for (int i = 0; i < 5; i++) {
    int maxi = (i + 1) * 500;
    sum += max(3 * (maxi / 10), (maxi - (x[i] * (maxi / 250))) - 50 * w[i]);
  }
  sum += hx * 100;
  sum -= hw * 50;
  printf("%d\n", (int)max(sum, 0));
}
int main() {
  cout << fixed << setprecision(16);
  run();
  return 0;
}
