#include <bits/stdc++.h>
using namespace std;
int main() {
  long long res = 0;
  double m[5], w[5], s, ns;
  double p[5] = {500, 1000, 1500, 2000, 2500};
  for (int i = 0; i < 5; i++) {
    cin >> m[i];
  }
  for (int i = 0; i < 5; i++) {
    cin >> w[i];
  }
  cin >> s >> ns;
  for (int i = 0; i < 5; i++) {
    if ((((1 - (m[i] / 250)) * p[i]) - (50 * w[i])) >= 0.3 * p[i])
      res += ((1 - (m[i] / 250)) * p[i]) - (50 * w[i]);
    else
      res += 0.3 * p[i] + 1;
  }
  res += (s * 100);
  res -= (ns * 50);
  cout << (int)res;
  return 0;
}
