#include <bits/stdc++.h>
using namespace std;
int main() {
  int x[5] = {500, 1000, 1500, 2000, 2500}, m[5], w[5], hs = 0, hu = 0, t,
      sco = 0;
  for (int i = 0; i < 5; i++) {
    cin >> t;
    if (0 <= t && t <= 119) {
      m[i] = t;
    }
  }
  for (int i = 0; i < 5; i++) {
    cin >> t;
    if (0 <= t && t <= 10) {
      w[i] = t;
    }
  }
  cin >> t;
  if (0 <= t && t <= 20) {
    hs = t;
  }
  cin >> t;
  if (0 <= t && t <= 20) {
    hu = t;
  }
  for (int i = 0; i < 5; i++) {
    sco += ((0.3 * x[i]) < ((1 - (m[i] / 250.0)) * x[i] - 50 * w[i])
                ? ((1 - (m[i] / 250.0)) * x[i] - 50 * w[i])
                : (0.3 * x[i]));
  }
  sco -= 50 * hu;
  sco += 100 * hs;
  cout << sco << endl;
}
