#include <bits/stdc++.h>
using namespace std;
int main() {
  int m[5], w[5], hack, nohack, arr[5] = {500, 1000, 1500, 2000, 2500}, sum = 0;
  for (int i = 0; i < 5; i++) {
    cin >> m[i];
  }
  for (int i = 0; i < 5; i++) {
    cin >> w[i];
  }
  cin >> hack >> nohack;
  for (int i = 0; i < 5; i++) {
    sum += max((0.3 * arr[i]),
               abs((abs(1 - (m[i] / 250.0)) * arr[i]) - (50 * w[i])));
  }
  sum += hack * 100;
  sum -= nohack * 50;
  cout << sum << endl;
  return 0;
}
