#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, b, c, d, e;
  double a1, a2, a3, a4, a5;
  double s, uns;
  cin >> a >> b >> c >> d >> e;
  cin >> a1 >> a2 >> a3 >> a4 >> a5;
  cin >> s >> uns;
  double ans = max(.3 * 500, (1 - a / 250.0) * 500 - 50 * a1);
  if (a == 0) {
    ans = min(0.0, ans);
  }
  double ans1 = max(.3 * 1000, (1 - b / 250.0) * 1000 - 50 * a2);
  if (b == 0) {
    ans1 = min(0.0, ans1);
  }
  double ans2 = max(.3 * 1500, (1 - c / 250.0) * 1500 - 50 * a3);
  if (c == 0) {
    ans2 = min(0.0, ans2);
  }
  int ans3 = max(.3 * 2000, (1 - d / 250.0) * 2000 - 50 * a4);
  if (d == 0) {
    ans3 = min(0, ans3);
  }
  double ans4 = max(.3 * 2500, (1 - e / 250.0) * 2500 - 50 * a5);
  if (e == 0) {
    ans4 = min(0.0, ans4);
  }
  if (a == 0 && b == 0 && c == 0 && d == 0 && e == 0) {
    cout << 0 << endl;
  } else {
    if (((ans + ans1 + ans2 + ans3 + ans4) + (s * 100)) - (uns * 50) <= 0) {
      cout << 0 << endl;
    } else {
      cout << ((ans + ans1 + ans2 + ans3 + ans4) + (s * 100)) - (uns * 50)
           << endl;
    }
  }
  return 0;
}
