#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, n, hs, hu, score = 0, sum = 0, x;
  vector<int> vm;
  vector<int> vw;
  for (i = 1; i <= 5; i++) {
    cin >> n;
    vm.push_back(n);
  }
  for (i = 1; i <= 5; i++) {
    cin >> n;
    vw.push_back(n);
  }
  cin >> hs;
  cin >> hu;
  for (i = 0; i < vm.size(); i++) {
    sum += 500;
    x = (1 - (vm[i] / (double)250)) * sum - 50 * vw[i];
    score += x;
  }
  score = score + (100 * hs) - (50 * hu);
  cout << score << endl;
  vm.clear();
  vw.clear();
  return 0;
}
