#include <bits/stdc++.h>
using namespace std;
int main() {
  int w[6], hs, hu, i, j, ans[6];
  int mm[] = {500, 1000, 1500, 2000, 2500};
  double m[6];
  for (i = 0; i < 5; i++) {
    cin >> m[i];
  }
  for (i = 0; i < 5; i++) {
    cin >> w[i];
  }
  cin >> hs;
  cin >> hu;
  int s = 0;
  int p, k;
  for (i = 0; i < 5; i++) {
    k = 3 * mm[i];
    k = k / 10;
    mm[i] = mm[i] / 250;
    p = 250 - m[i];
    ans[i] = (p * mm[i]) - (50 * w[i]);
    if (ans[i] < k) ans[i] = k;
    s = s + ans[i];
  }
  s = s + 100 * hs - 50 * hu;
  cout << s << "\n";
}
