#include <bits/stdc++.h>
using namespace std;
int i, hs, hu, m[6], w[6], score;
int main() {
  for (i = 1; i < 6; i++) cin >> m[i];
  for (i = 1; i < 6; i++) cin >> w[i];
  cin >> hs >> hu;
  score = 100 * hs - 50 * hu;
  for (i = 1; i < 6; i++) {
    int x = i * 500;
    score += max((int)(x * 0.3), (int)((1 - m[i] / 250.0) * x) - 50 * w[i]);
  }
  cout << score << endl;
}
