#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int p[5], m[5], w[5], h[2];
  p[0] = 500;
  p[1] = 1000;
  p[2] = 1500;
  p[3] = 2000;
  p[4] = 2500;
  for (int i = 0; i < 5; i++) {
    cin >> m[i];
  }
  for (int i = 0; i < 5; i++) {
    cin >> w[i];
  }
  for (int i = 0; i < 2; i++) {
    cin >> h[i];
  }
  int score = 100 * h[0] - 50 * h[1];
  for (int i = 0; i < 5; i++) {
    int x = .3 * p[i];
    int y = ((250 - m[i]) * p[i]) / 250;
    y -= 50 * w[i];
    score += max(x, y);
  }
  cout << score;
}
