#include <bits/stdc++.h>
using namespace std;
int x[5];
int x1[5] = {500, 1000, 1500, 2000, 2500};
int w[5];
int main() {
  int mp1 = 0;
  int suc, unsuc;
  for (int i = 0; i < 5; i++) {
    cin >> x[i];
  }
  for (int i = 0; i < 5; i++) {
    cin >> w[i];
  }
  cin >> suc >> unsuc;
  for (int i = 0; i < 5; i++) {
    mp1 += max(((3 * x1[i]) / 10), x1[i] - ((x1[i] / 250) * x[i])) - 50 * w[i];
  }
  mp1 += suc * 100;
  mp1 -= unsuc * 50;
  cout << mp1;
  return 0;
}
