#include <bits/stdc++.h>
using namespace std;
int tim[5], wrong[5], ghack, bhack;
int score[5];
int main() {
  if (fopen("cf604a.in", "r")) {
    freopen("cf604a.in", "r", stdin);
    freopen("cf604a.out", "w", stdout);
  }
  cin >> tim[0] >> tim[1] >> tim[2] >> tim[3] >> tim[4] >> wrong[0] >>
      wrong[1] >> wrong[2] >> wrong[3] >> wrong[4] >> ghack >> bhack;
  for (int i = 0; i < 5; i++) {
    score[i] = (i + 1) * 500;
    score[i] = max(score[i] * 3 / 10,
                   score[i] - (score[i] * tim[i] / 250) - 50 * wrong[i]);
  }
  cout << score[0] + score[1] + score[2] + score[3] + score[4] + 100 * ghack -
              50 * bhack;
}
