#include <bits/stdc++.h>
using namespace std;
int points[5] = {500, 1000, 1500, 2000, 2500};
int times[5];
int wrong[5];
int s_hack, u_hack;
int score;
int main() {
  score = 0;
  for (int i = 0; i < 5; i++) {
    scanf("%d", &times[i]);
  }
  for (int i = 0; i < 5; i++) {
    scanf("%d", &wrong[i]);
  }
  scanf("%d %d", &s_hack, &u_hack);
  for (int i = 0; i < 5; i++) {
    score += 3 * points[i] / 10 >=
                     (points[i] - times[i] * points[i] / 250) - 50.0 * wrong[i]
                 ? 3 * points[i] / 10
                 : (points[i] - times[i] * points[i] / 250) - 50.0 * wrong[i];
  }
  score += s_hack * 100 - u_hack * 50;
  printf("%d\n", score);
}
