#include <bits/stdc++.h>
using namespace std;
int main() {
  int m[6], w[6], correct, wrong;
  int x[6] = {0, 500, 1000, 1500, 2000, 2500};
  long long answer = 0;
  for (int i = 1; i <= 5; i++) {
    cin >> m[i];
  }
  for (int i = 1; i <= 5; i++) {
    cin >> w[i];
  }
  cin >> correct >> wrong;
  for (int i = 1; i <= 5; i++) {
    answer += max(3 * x[i] / 10, (250 - m[i]) * x[i] / 250 - 50 * w[i]);
  }
  cout << answer + correct * 100 - wrong * 50 << endl;
  return 0;
}
