#include <bits/stdc++.h>
using namespace std;
inline int input() {
  int a;
  cin >> a;
  return a;
}
template <typename T>
inline void output(T a, int p) {
  if (p) {
    cout << fixed << setprecision(p) << a << "\n";
  } else {
    cout << a << "\n";
  }
}
int main() {
  cin.tie(0);
  double S[5] = {500, 1000, 1500, 2000, 2500};
  double SS[5] = {2, 4, 6, 8, 10};
  vector<double> M(5);
  vector<double> W(5);
  double hs, hu;
  for (int i = (0); i < (5); i++) {
    cin >> M[i];
  }
  for (int i = (0); i < (5); i++) {
    cin >> W[i];
  }
  cin >> hs >> hu;
  double ret = 0;
  for (int i = (0); i < (5); i++) {
    ret += max(0.3 * S[i], S[i] - SS[i] * M[i] - 50 * W[i]);
  }
  ret += hs * 100 - hu * 50;
  int r = int(ret);
  if ((double)r - ret > ret + 1 - (double)r) {
    r++;
  }
  output(r, 0);
  return 0;
}
