#include <bits/stdc++.h>
using namespace std;
int main() {
  int min[5];
  int w[5];
  int max[5] = {500, 1000, 1500, 2000, 2500};
  int succ;
  int unsucc;
  for (int i = 0; i < 5; ++i) {
    cin >> min[i];
    min[i] = 250 - min[i];
  }
  for (int i = 0; i < 5; ++i) {
    cin >> w[i];
  }
  cin >> succ >> unsucc;
  int score = 0;
  int add = 0;
  for (int i = 0; i < 5; ++i) {
    if (3 * max[i] > (((long double)min[i]) / 25) * max[i] - 500 * w[i]) {
      score += 3 * max[i];
    } else {
      add += min[i] * max[i];
      score -= 500 * w[i];
    }
  }
  add /= 25;
  score += add;
  score /= 10;
  score += 100 * succ;
  score -= 50 * unsucc;
  cout << score << endl;
  return 0;
}
