#include <bits/stdc++.h>
using namespace std;
int x[5] = {500, 1000, 1500, 2000, 2500};
int m[5];
int w[5];
int hs, hf;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 0; i < 5; i++) cin >> m[i];
  for (int i = 0; i < 5; i++) cin >> w[i];
  cin >> hs >> hf;
  int ans = 0;
  for (int i = 0; i < 5; i++) {
    int cur = max(3 * (float)(x[i] / 10),
                  x[i] - ((float)(x[i] / 250) * m[i]) - 50 * w[i]);
    ans += cur;
  }
  ans += hs * 100 - hf * 50;
  cout << ans;
  return 0;
}
