#include <bits/stdc++.h>
using namespace std;
int x[6];
int m[6];
int w[6];
int h, uh;
int main() {
  x[0] = 500;
  for (int i = 0; i < 5; i++) {
    cin >> m[i];
    if (i) x[i] = x[i - 1] + 500;
  }
  for (int i = 0; i < 5; i++) cin >> w[i];
  cin >> h >> uh;
  int score = 0;
  for (int i = 0; i < 5; i++) {
    int bla = 3 * x[i] / 10;
    score += max(bla, (x[i] * (250 - m[i])) / 250 - 50 * w[i]);
  }
  cout << score + 100 * h - 50 * uh << endl;
  return 0;
}
