#include <bits/stdc++.h>
int main() {
  int max = 0, j, k, l, n, o, p, a, b, c, h_s, h_u, sum = 0, x[100], m[100],
      w[100], i;
  x[0] = 500;
  x[1] = 1000;
  x[2] = 1500;
  x[3] = 2000;
  x[4] = 2500;
  for (i = 0; i < 5; i++) scanf("%d", &m[i]);
  for (i = 0; i < 5; i++) scanf("%d", &w[i]);
  scanf("%d %d", &h_s, &h_u);
  for (i = 0; i < 5; i++) {
    j = 3 * x[i] / 10;
    b = x[i] - ((m[i] * x[i]) / 250);
    a = b - (50 * w[i]);
    if (a >= max)
      max = a;
    else
      max = j;
    sum = sum + max;
  }
  c = sum + ((h_s * 100) - (h_u * 50));
  printf("%d\n", c);
  return 0;
}
