#include <bits/stdc++.h>
using namespace std;
int main() {
  float m[5], w[5], hs, hu, total = 0, x[5] = {500, 1000, 1500, 2000, 2500};
  cin >> m[0] >> m[1] >> m[2] >> m[3] >> m[4] >> w[0] >> w[1] >> w[2] >> w[3] >>
      w[4] >> hs >> hu;
  total += (100 * hs) - (50 * hu);
  for (int i = 0; i < 5; i++) {
    total += max(float(0.3 * x[i]), ((1 - (m[i] / 250)) * x[i] - 50 * w[i]));
  }
  cout << int(total) << endl;
}
