#include <bits/stdc++.h>
using namespace std;
double m, w, h1, h2, M, i;
double a[6];
double S;
int main() {
  S = 0;
  for (int i = 1; i <= 5; i++) {
    cin >> m;
    a[i] = m;
  }
  for (int i = 1; i <= 5; i++) {
    cin >> w;
    M = max(0.3 * (i * 500), ((1 - a[i] / 250) * (i * 500) - 50 * w));
    S = S + M;
  }
  cin >> h1;
  S = S + h1 * 100;
  cin >> h2;
  S = S - h2 * 50;
  cout << S;
  return 0;
}
