#include <bits/stdc++.h>
using namespace std;
const int N = 10000010;
double a[6] = {0.0, 500.0, 1000.0, 1500.0, 2000.0, 2500.0};
double w[N], m[N];
int n, k;
int main() {
  for (int i = 1; i <= 5; i++) {
    cin >> m[i];
  }
  for (int i = 1; i <= 5; i++) {
    cin >> w[i];
  }
  double ans = 0;
  cin >> n >> k;
  for (int i = 1; i <= 5; i++) {
    a[i] = max(0.3 * a[i], (1.0 - m[i] / 250) * a[i] - 50 * w[i]);
  }
  for (int i = 1; i <= 5; i++) {
    ans += a[i];
  }
  ans += (100 * n - 50 * k);
  cout << ans << endl;
  return 0;
}
