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