#include <bits/stdc++.h>
using namespace std;
int main() {
  int m[5], w[5], sh, uh, p = 0;
  int mp[] = {500, 1000, 1500, 2000, 2500};
  int i;
  float t;
  for (i = 0; i < 5; i++) scanf("%d", &m[i]);
  for (i = 0; i < 5; i++) scanf("%d", &w[i]);
  scanf("%d%d", &sh, &uh);
  for (i = 0; i < 5; i++) {
    t = (1 - (m[i] / 250.0));
    p += max((int)0.3 * mp[i], (int)ceil((t * mp[i]) - 50 * w[i] - 0.001));
  }
  p += 100 * sh;
  p -= 50 * uh;
  printf("%d", p);
  return 0;
}
