#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int s[5], m[5], w[5], hs, hu, i;
  s[0] = 500;
  s[1] = 1000;
  s[2] = 1500;
  s[3] = 2000;
  s[4] = 2500;
  for (i = 0; i < 5; i++) {
    cin >> m[i];
  }
  for (i = 0; i < 5; i++) {
    cin >> w[i];
  }
  cin >> hs >> hu;
  double sum = 0;
  for (i = 0; i < 5; i++) {
    sum = sum + max(3 * s[i] / 10, (s[i] - (s[i] * m[i] / 250)) - 50 * w[i]);
  }
  sum = sum - (50 * hu) + (100 * hs);
  cout << (int)sum;
  return 0;
}
