#include <bits/stdc++.h>
using namespace std;
long long int ar[500009], br[500009];
int main() {
  long long int a, b, c, i, j, k = 0;
  for (i = 1; i <= 5; i++) {
    cin >> ar[i];
  }
  for (i = 1; i <= 5; i++) {
    cin >> br[i];
  }
  cin >> a >> b;
  for (i = 1; i <= 5; i++) {
    k = k + max(((i * 500 * 3) / 10),
                ((((250 - ar[i]) * (i * 500)) / 250) - (50 * br[i])));
  }
  k = k + (a * 100) - (b * 50);
  cout << k << endl;
}
