#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e;
  while (scanf("%d %d %d %d %d", &a, &b, &c, &d, &e) == 5) {
    int m = 500, n = 1000, o = 1500, p = 2000, q = 2500, r, s, t, u, v, w, x, y,
        nn, mm, ww, f, g, h, i, j, k, l;
    scanf("%d %d %d %d %d", &f, &g, &h, &i, &j);
    scanf("%d %d", &k, &l);
    int aa = ((0.3 * m) + 1);
    int bb = ((0.3 * n) + 1);
    int cc = ((0.3 * o) + 1);
    int dd = ((0.3 * p) + 1);
    int ee = ((0.3 * q) + 1);
    r = max(aa, (250 - a) * m / 250 - 50 * f);
    s = max(bb, (250 - b) * n / 250 - 50 * g);
    t = max(cc, (250 - c) * o / 250 - 50 * h);
    u = max(dd, (250 - d) * p / 250 - 50 * i);
    v = max(ee, (250 - e) * q / 250 - 50 * j);
    w = (r + s + t + u + v);
    if (k > 0 && l == 0) {
      x = (w + (k * 100));
      printf("%d\n", x);
    } else if (k > 0 && l > 0) {
      nn = (k * 100);
      mm = (l * 50);
      ww = (nn - mm);
      printf("%d\n", (w + ww));
    } else if (k < 1 && l > 0) {
      y = (w - (l * 50));
      printf("%d\n", y);
    }
  }
  return 0;
}
