#include <bits/stdc++.h>
using namespace std;
double a[5], b[5], s[2], x, y, z, n, m, w, e, p[5];
int main() {
  cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4] >> b[0] >> b[1] >> b[2] >> b[3] >>
      b[4] >> n >> m;
  p[0] = 500;
  p[1] = 1000;
  p[2] = 1500;
  p[3] = 2000;
  p[4] = 2500;
  for (int i = 0; i < 5; i++) {
    e = max(0.3 * p[i], ((1 - a[i] / 250) * p[i]) - (50 * b[i]));
    w += e;
  }
  w += (n * 100);
  w -= (m * 50);
  cout << w;
  return 0;
}
