#include <bits/stdc++.h>
int main(int argc, char const *argv[]) {
  std::ios_base::sync_with_stdio(false);
  int n = 5;
  int x[] = {500, 1000, 1500, 2000, 2500};
  int *m = new int[n];
  int *w = new int[n];
  for (int i = 0; i < n; i++) {
    std::cin >> m[i];
  }
  for (int i = 0; i < n; i++) {
    std::cin >> w[i];
  }
  int hu, hs;
  std::cin >> hs >> hu;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += std::max(75 * x[i], (250 - m[i]) * x[i] - 12500 * w[i]);
  }
  sum /= 250;
  sum += 100 * hs - 50 * hu;
  std::cout << sum << std::endl;
  return 0;
}
