#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 5;
  vector<int> m(n);
  vector<int> w(n);
  int x[5] = {500, 1000, 1500, 2000, 2500};
  long long ans = 0;
  for (int i = 0; i != n; ++i) {
    cin >> m[i];
  }
  for (int i = 0; i != n; ++i) {
    cin >> w[i];
    ans += max(75 * x[i], (250 - m[i]) * x[i] - 12500 * w[i]);
  }
  ans /= 250;
  int hs, hu;
  cin >> hs >> hu;
  ans -= 50 * hu;
  ans += 100 * hs;
  cout << ans;
  return 0;
}
