#include <bits/stdc++.h>
using namespace std;
int check(int s, int b, int l) {
  if ((0.3 * s) > ((250 - b) * s / 250 - 50 * l)) {
    return (0.3 * s);
  } else {
    return ((250 - b) * s / 250 - 50 * l);
  }
}
int main() {
  int m1, m2, m3, m4, m5, w1, w2, w3, w4, w5, hs, hu, sum1, sum2, sum3, sum4,
      sum5, sum;
  const int x1 = 500, x2 = 1000, x3 = 1500, x4 = 2000, x5 = 2500;
  cin >> m1;
  while (m1 < 0 || m1 > 119) {
    cout << "error";
    cin >> m1;
  }
  cin >> m2;
  while (m2 < 0 || m2 > 119) {
    cout << "error";
    cin >> m2;
  }
  cin >> m3;
  while (m3 < 0 || m3 > 119) {
    cout << "error";
    cin >> m3;
  }
  cin >> m4;
  while (m4 < 0 || m4 > 119) {
    cout << "error";
    cin >> m4;
  }
  cin >> m5;
  while (m5 < 0 || m5 > 119) {
    cout << "error";
    cin >> m5;
  }
  cin >> w1;
  while (w1 < 0 || w1 > 10) {
    cout << "error, enter new number";
    cin >> w1;
  }
  cin >> w2;
  while (w2 < 0 || w2 > 10) {
    cout << "error, enter new number";
    cin >> w2;
  }
  cin >> w3;
  while (w3 < 0 || w3 > 10) {
    cout << "error, enter new number";
    cin >> w3;
  }
  cin >> w4;
  while (w4 < 0 || w4 > 10) {
    cout << "error, enter new number";
    cin >> w4;
  }
  cin >> w5;
  while (w5 < 0 || w5 > 10) {
    cout << "error, enter new number";
    cin >> w5;
  }
  cin >> hs;
  while (hs < 0) {
    cout << "error, enter new nummber ";
    cin >> hs;
  }
  cin >> hu;
  while (hu > 20) {
    cout << "error enter new nummber";
    cin >> hu;
  }
  sum1 = check(x1, m1, w1);
  sum2 = check(x2, m2, w2);
  sum3 = check(x3, m3, w3);
  sum4 = check(x4, m4, w4);
  sum5 = check(x5, m5, w5);
  sum = sum1 + sum2 + sum3 + sum4 + sum5 + 100 * hs - 50 * hu;
  cout << sum;
  return 0;
}
