#include <bits/stdc++.h>
int a[10], i, b[10], hs, hu, sum, t, ans;
double k[10];
int main() {
  t = 500;
  for (i = 1; i <= 5; i++) scanf("%d", &a[i]);
  for (i = 1; i <= 5; i++) {
    scanf("%d", &b[i]);
    sum = sum + b[i];
  }
  scanf("%d %d", &hs, &hu);
  for (i = 1; i <= 5; i++) {
    k[i] = 250 - a[i];
    k[i] = k[i] / 250;
  }
  for (i = 1; i <= 5; i++) {
    ans = ans + t * k[i];
    t = t + 500;
  }
  ans = ans - 50 * sum - 50 * hu;
  ans = ans + 100 * hs;
  printf("%d", ans);
}
