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