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