#include <bits/stdc++.h>
using namespace std;
int main() {
  int f[5] = {500, 1000, 1500, 2000, 2500};
  int m[5];
  int w[5];
  int hs, hu;
  while (~scanf("%d%d%d%d%d", &m[0], &m[1], &m[2], &m[3], &m[4])) {
    for (int i = 0; i < 5; i++) scanf("%d", &w[i]);
    scanf("%d%d", &hs, &hu);
    int sum = 0;
    for (int i = 0; i < 5; i++)
      sum += max(f[i] * 3 / 10, f[i] - f[i] / 250 * m[i] - 50 * w[i]);
    sum += 100 * hs - 50 * hu;
    printf("%d\n", sum);
  }
  return 0;
}
