#include <bits/stdc++.h>
using namespace std;
int a[5];
int b[5];
int c[] = {500, 1000, 1500, 2000, 2500};
int x, y;
int scr = 0;
int s(int x) {
  int y = c[x] / 250;
  int q = 0.3 * c[x];
  int w = c[x] - y * a[x] - 50 * b[x];
  return max(q, w);
}
int main() {
  for (int i = 0; i < 5; ++i) scanf("%d", &a[i]);
  for (int i = 0; i < 5; ++i) scanf("%d", &b[i]);
  scanf("%d%d", &x, &y);
  for (int i = 0; i < 5; ++i) {
    scr += s(i);
  }
  scr += (100 * x - y * 50);
  printf("%d\n", scr);
}
