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