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