#include <bits/stdc++.h>
int main() {
  int a, b, c, d, w[10], m[10], n, sum = 0, test, test1, s, u, ans;
  for (a = 1; a <= 5; a++) scanf("%d", &m[a]);
  for (a = 1; a <= 5; a++) scanf("%d", &w[a]);
  scanf("%d %d", &s, &u);
  for (a = 1; a <= 5; a++) {
    test = (.3) * a * 500;
    ans = (250 - m[a]);
    ans = ans * (a * 500);
    test1 = ans / 250;
    test1 = test1 - (50 * w[a]);
    if (test > test1)
      sum += test;
    else
      sum += test1;
  }
  a = (s * 100) - (u * 50);
  sum += a;
  printf("%d\n", sum);
  return 0;
}
