#include <bits/stdc++.h>
using namespace std;
int max(int a, int b) {
  if (a > b) return a;
  return b;
}
int minutes[6], unsuccesful[6], sh, uh, points = 500;
int main() {
  int i, j, score = 0;
  for (i = 1; i <= 5; i++) cin >> minutes[i];
  for (i = 1; i <= 5; i++) cin >> unsuccesful[i];
  cin >> sh >> uh;
  for (i = 1; i <= 5; i++) {
    score += max(3 * (points / 10),
                 (250 - minutes[i]) * (points / 250) - 50 * unsuccesful[i]);
    points += 500;
  }
  score += 100 * sh;
  score -= 50 * uh;
  cout << score;
  return 0;
}
