#include <bits/stdc++.h>
using namespace std;
long double max(long double a, long double b) { return (a > b ? a : b); }
int main() {
  long double b[5] = {500, 1000, 1500, 2000, 2500};
  long double m[5], w[5];
  for (int k = 0; k < 5; k++) cin >> m[k];
  for (int k = 0; k < 5; k++) cin >> w[k];
  long double result = 0.0;
  long double x, y;
  cin >> x >> y;
  x *= 100;
  y *= (-50);
  for (int k = 0; k < 5; k++)
    result += max(0.3 * b[k], (1.0 - m[k] / 250.0) * b[k] - 50 * w[k]);
  cout << (long long)(result + x + y) << endl;
  return 0;
}
