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