#include <bits/stdc++.h>
using namespace std;
long long int ans;
int main() {
  std::ios_base::sync_with_stdio(false);
  double m[5], w[5], hs, hu, n = 5;
  for (int i = 0; i < n; i++) {
    cin >> m[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> w[i];
  }
  cin >> hs >> hu;
  ans = hs * (100) - hu * 50;
  int a = 500;
  for (int i = 0; i < n; i++) {
    double x = (m[i] / 250);
    ans = ans + max(0.3 * a, ((1 - x) * a - (50 * w[i])));
    a = a + 500;
  }
  cout << ans;
  return 0;
}
