#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> M(5);
  vector<int> points(5);
  points[0] = 500;
  points[1] = 1000;
  points[2] = 1500;
  points[3] = 2000;
  points[4] = 2500;
  for (int i = 0; i < 5; i++) cin >> M[i];
  vector<int> W(5);
  for (int i = 0; i < 5; i++) cin >> W[i];
  int hs, hu;
  cin >> hs >> hu;
  int ans = 0;
  for (int i = 0; i < 5; i++) {
    double a = 0.3 * points[i];
    double b = (1 - (M[i] / 250.0)) * points[i] - 50 * W[i];
    ans += max(a, b);
  }
  ans = ans + (100 * hs);
  ans = ans - (50 * hu);
  cout << ans << endl;
  return 0;
}
