#include <bits/stdc++.h>
int main() {
  int a1, a2, a3, a4, a5;
  int b1, b2, b3, b4, b5;
  double result1 = 0, result2 = 0, result3 = 0, result4 = 0, result5 = 0,
         result6 = 0, result = 0;
  int h1, h2;
  double c1, c2, c3, c4, c5;
  scanf("%d%d%d%d%d", &a1, &a2, &a3, &a4, &a5);
  scanf("%d%d%d%d%d", &b1, &b2, &b3, &b4, &b5);
  scanf("%d%d", &h1, &h2);
  result1 = (250 - a1) * 2 - 50 * b1;
  result2 = (250 - a2) * 4 - 50 * b2;
  result3 = (250 - a3) * 6 - 50 * b3;
  result4 = (250 - a4) * 8 - 50 * b4;
  result5 = (250 - a5) * 10 - 50 * b5;
  c1 = 0.3 * 500;
  c2 = 0.3 * 1000;
  c3 = 0.3 * 1500;
  c4 = 0.3 * 2000;
  c5 = 0.3 * 2500;
  if (c1 > result1) result1 = c1;
  if (c2 > result2) result2 = c2;
  if (c3 > result3) result3 = c3;
  if (c4 > result4) result4 = c4;
  if (c5 > result5) result5 = c5;
  result6 = h1 * 100 - h2 * 50;
  result = result1 + result2 + result3 + result4 + result5 + result6;
  printf("%.0lf", result);
}
