#include <bits/stdc++.h>
using namespace std;
int max(int a, int b) { return a > b ? a : b; }
int main() {
  int m[5];
  int w[5];
  int h[2];
  int x[5] = {500, 1000, 1500, 2000, 2500};
  while (cin >> m[0] >> m[1] >> m[2] >> m[3] >> m[4]) {
    int i;
    float sum = 0;
    for (i = 0; i < 5; i++) cin >> w[i];
    cin >> h[0] >> h[1];
    for (i = 0; i < 5; i++) {
      sum += max(0.3 * x[i], (1 - (m[i] / 250.0f)) * x[i] - 50 * w[i]);
    }
    sum = sum + h[0] * 100 - h[1] * 50;
    cout << (int)sum << endl;
  }
  return 0;
}
