#include <bits/stdc++.h>
using namespace std;
int main() {
  float a, b, c, d, e, q, w, g, r, t, h, l, tt = 0;
  cin >> a >> b >> c >> d >> g;
  cin >> q >> w >> e >> r >> t;
  cin >> h >> l;
  if ((0.3) * 500 >= (1 - a / 250) * 500 - 50 * q)
    tt = (0.3) * 500;
  else
    tt = (1 - a / 250) * 500 - 50 * q;
  if ((0.3) * 1000 >= (1 - b / 250) * 1000 - 50 * w)
    tt += (0.3) * 1000;
  else
    tt += (1 - b / 250) * 1000 - 50 * w;
  if ((0.3) * 1500 >= (1 - c / 250) * 1500 - 50 * e)
    tt += (0.3) * 1500;
  else
    tt += (1 - c / 250) * 1500 - 50 * e;
  if ((0.3) * 2000 >= (1 - d / 250) * 2000 - 50 * r)
    tt += (0.3) * 2000;
  else
    tt += (1 - d / 250) * 2000 - 50 * r;
  if ((0.3) * 2500 >= (1 - g / 250) * 2500 - 50 * t)
    tt += 0.3 * 2500;
  else
    tt += (1 - g / 250) * 2500 - 50 * t;
  tt += h * 100 - l * 50;
  cout << tt;
}
