#include <bits/stdc++.h>
using namespace std;
int main() {
  float x = 500.0;
  float m[5], w[5], h, uh, score = 0;
  int i;
  for (i = 0; i < 5; i++) cin >> m[i];
  for (i = 0; i < 5; i++) cin >> w[i];
  cin >> h >> uh;
  for (i = 0; i < 5; i++) {
    if (0.3 * x > (1 - m[i] / 250) * x - 50 * w[i])
      score += 0.3 * x;
    else
      score += (1 - m[i] / 250) * x - 50 * w[i];
    x += 500;
  }
  score = score + 100 * h - 50 * uh;
  cout << score;
}
