#include <bits/stdc++.h>
using namespace std;
int main() {
  double balls[5] = {500, 1000, 1500, 2000, 2500};
  double m[5];
  double w[5];
  int res = 0;
  int i, h1, h2;
  for (i = 0; i < 5; i++) cin >> m[i];
  for (i = 0; i < 5; i++) cin >> w[i];
  cin >> h1 >> h2;
  for (i = 0; i < 5; i++)
    res = res + max(0.3 * balls[i],
                    ((1 - (m[i] / 250.0)) * balls[i] - (50.0 * w[i])));
  res = res + (h1 * 100) - (h2 * 50);
  if (res < 0) res = 0;
  cout << res;
}
