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