#include <bits/stdc++.h>
using namespace std;
float max(float a, float b) {
  if (a > b) return a;
  return b;
}
int main() {
  float arr[5], wrr[5];
  cin >> arr[0] >> arr[1] >> arr[2] >> arr[3] >> arr[4];
  cin >> wrr[0] >> wrr[1] >> wrr[2] >> wrr[3] >> wrr[4];
  float h, uh;
  cin >> h >> uh;
  int points = 0;
  float x = 500;
  for (int i = 0; i < 5; ++i) {
    int a = 0.3 * x;
    a++;
    int b = ((1.0 - arr[i] / 250.0) * x) - 50.0 * wrr[i];
    points += max(a, b);
    x = x + 500;
  }
  points = points - 50.0 * uh + 100 * h;
  cout << points;
}
