#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  double w;
  double ans = 0;
  double m[10];
  double f[10] = {500, 1000, 1500, 2000, 2500};
  for (int i = 0; i < 5; i++) cin >> m[i];
  for (int i = 0; i < 5; i++) {
    cin >> w;
    ans += max(0.3 * f[i], (1 - m[i] / 250.0) * f[i] - 50.0 * w);
  }
  cin >> w;
  ans += w * 100.0;
  cin >> w;
  ans -= w * 50.0;
  printf("%.lf\n", ans);
  return 0;
}
