#include <bits/stdc++.h>
using namespace std;
int main() {
  int m[6], w[6], i, j, x, y;
  double ans = 0, temp = 0, f[6];
  for (i = 1; i <= 5; i++) cin >> m[i];
  for (i = 1; i <= 5; i++) cin >> w[i];
  cin >> x >> y;
  for (i = 1; i <= 5; i++) {
    f[i] = max(0.3 * 500 * i, (1 - (m[i] * 1.0 / 250)) * 500 * i - 50 * w[i]);
  }
  for (i = 1; i <= 5; i++) ans += f[i];
  ans = ans + x * 100 - y * 50;
  cout << int(ans) << endl;
  return 0;
}
