#include <bits/stdc++.h>
using namespace std;
int m[5], w[5];
long long total;
int sh, uh;
int main() {
  cin >> m[0] >> m[1] >> m[2] >> m[3] >> m[4];
  cin >> w[0] >> w[1] >> w[2] >> w[3] >> w[4];
  cin >> sh >> uh;
  for (int i = 0; i < 5; i++) {
    int x = 500 * (i + 1);
    total += max(0.3 * x, (1.0 - (m[i] * 1.0 / 250)) * x - (50.0 * w[i]));
  }
  total += 100 * sh;
  total -= 50 * uh;
  cout << total << endl;
}
