#include <bits/stdc++.h>
using namespace std;
int max(int a, int b) {
  if (a > b)
    return a;
  else
    return b;
}
int main() {
  vector<int> v1;
  for (int i = 0; i < 5; i++) {
    int a;
    cin >> a;
    v1.push_back(a);
  }
  vector<int> v2;
  for (int i = 0; i < 5; i++) {
    int a;
    cin >> a;
    v2.push_back(a);
  }
  int h, u;
  cin >> h >> u;
  vector<int> v;
  for (int i = 0; i < 5; i++) {
    v.push_back(500 * (i + 1));
  }
  int score = 0;
  for (int i = 0; i < 5; i++) {
    score += max(0.3 * v[i], (250 - v1[i]) * (v[i] / 250) - 50 * v2[i]);
  }
  score += (h * 100 - u * 50);
  cout << score;
  return 0;
}
