#include <bits/stdc++.h>
using namespace std;
int main() {
  double m1, m2, m3, m4, m5, w1, w2, w3, w4, w5, hs, hu;
  double a, b, c, d, e;
  int sum = 0, x;
  cin >> m1 >> m2 >> m3 >> m4 >> m5 >> w1 >> w2 >> w3 >> w4 >> w5 >> hs >> hu;
  a = max((0.3 * 500), (((1 - (m1 / 250)) * 500) - (50 * w1)));
  b = max((0.3 * 1000), (((1 - (m2 / 250)) * 1000) - (50 * w2)));
  c = max((0.3 * 1500), (((1 - (m3 / 250)) * 1500) - (50 * w3)));
  d = max((0.3 * 2000), (((1 - (m4 / 250)) * 2000) - (50 * w4)));
  e = max((0.3 * 2500), (((1 - (m5 / 250)) * 2500) - (50 * w5)));
  hs *= 100;
  hu *= 50;
  x = hs - hu;
  sum = a + b + c + d + e + x;
  cout << sum << endl;
  return 0;
}
