#include <bits/stdc++.h>
using namespace std;
int main() {
  int i = 0, sh = 0, uh = 0;
  double m[5] = {0}, w[5] = {0}, score = 0;
  for (i = 0; i < 5; i++) {
    cin >> m[i];
  }
  for (i = 0; i < 5; i++) {
    cin >> w[i];
  }
  for (i = 0; i < 5; i++) {
    score += max(0.3 * (500 * (i + 1)),
                 (1 - m[i] / 250) * 500 * (i + 1) - 50 * w[i]);
    cout << "score = " << score << endl;
  }
  cin >> sh >> uh;
  score += 100 * sh;
  score -= 50 * uh;
  cout << score;
  return 0;
}
