#include <bits/stdc++.h>
using namespace std;
using namespace std;
long long mod = 1e9 + 7;
int a[5];
int w[5];
int v[5];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n = 5;
  int last = 0;
  for (int i = 0; i < n; i++) v[i] = last + 500, last = v[i];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) cin >> w[i];
  double res = 0.0;
  int hs, hf;
  cin >> hs >> hf;
  res += (hs * 100) - hf * 50;
  for (int i = 0; i < n; i++) {
    double l = (1.0 - ((a[i] * 1.0) / 250)) * v[i] - 50 * w[i];
    res += max(0.3 * v[i], l);
  }
  int re = res;
  cout << re;
  return 0;
}
