#include <bits/stdc++.h>
int main() {
  int m1, m2, m3, m4, m5;
  int w1, w2, w3, w4, w5;
  int hs, hu;
  while (scanf("%d%d%d%d%d", &m1, &m2, &m3, &m4, &m5) != EOF) {
    scanf("%d%d%d%d%d", &w1, &w2, &w3, &w4, &w5);
    scanf("%d%d", &hs, &hu);
    int a = 2 * (250 - m1) - 50 * w1;
    int a1 = 3 / 10 * 500;
    int b = 4 * (250 - m2) - 50 * w2;
    int b1 = 3 / 10 * 1000;
    int c = 6 * (250 - m3) - 50 * w3;
    int c1 = 3 / 10 * 1500;
    int d = 8 * (250 - m4) - 50 * w4;
    int d1 = 3 / 10 * 2000;
    int e = 10 * (250 - m5) - 50 * w5;
    int e1 = 3 / 10 * 2500;
    int a2, b2, c2, d2, e2;
    if (a > a1) {
      a2 = a;
    } else if (a1 > a) {
      a2 = a1;
    }
    if (b > b1) {
      b2 = b;
    } else if (b1 > b) {
      b2 = b1;
    }
    if (c > c1) {
      c2 = c;
    } else if (c1 > c) {
      c2 = c1;
    }
    if (d > d1) {
      d2 = d;
    } else if (d1 > d) {
      d2 = d1;
    }
    if (e > e1) {
      e2 = e;
    } else if (e1 > e) {
      e2 = e1;
    }
    printf("%d\n", a2 + b2 + c2 + d2 + e2 + hs * 100 - hu * 50);
  }
  return 0;
}
