#include <bits/stdc++.h>
using namespace std;
int v[5];
int a[5];
int b[5];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  v[0] = 500;
  v[1] = 1000;
  v[2] = 1500;
  v[3] = 2000;
  v[4] = 2500;
  for (int i = 0; i < 5; i++) cin >> a[i];
  for (int i = 0; i < 5; i++) cin >> b[i];
  int x1, x2;
  cin >> x1 >> x2;
  double sum = 100 * x1 - 50 * x2;
  for (int i = 0; i < 5; i++) {
    sum += max(0.3 * v[i], (1 - a[i] / 250.0) * v[i] - 50 * b[i]);
  }
  cout << round(sum);
  return 0;
}
