#include <bits/stdc++.h>
using namespace std;
int n;
int m[300009];
int w[300009];
int a, b;
int x[] = {500, 1000, 1500, 2000, 2500};
int main() {
  n = 5;
  for (int i = 0; i < n; i++) {
    cin >> m[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> w[i];
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    double v = (1 - (double)m[i] / 250);
    ans += max((double)x[i] / 3, v * x[i] - 50 * w[i]);
  }
  cin >> a >> b;
  ans += a * 100;
  ans -= b * 50;
  cout << ans << endl;
}
