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