#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j;
  int tot[5], w[5], m[5];
  int h1, h2;
  for (i = 0, j = 500; i < 5; j += 500, i++) tot[i] = j / 250;
  for (int i = 0; i < 5; i++) cin >> m[i];
  for (int i = 0; i < 5; i++) cin >> w[i];
  cin >> h1;
  cin >> h2;
  int sum = 0;
  for (int i = 0; i < 5; i++)
    cout << tot[i] << " " << m[i] << " " << w[i] << endl;
  for (int i = 0; i < 5; i++) {
    sum += 0.3 * tot[i] > ((250 - m[i]) * tot[i] - 50 * w[i])
               ? 0.3 * tot[i]
               : ((250 - m[i]) * tot[i] - 50 * w[i]);
  }
  sum += 100 * h1 - 50 * h2;
  cout << sum << endl;
  return 0;
}
