#include <bits/stdc++.h>
int main(int argc, char *argv[]) {
  int m[5];
  for (int i = 0; i < 5; ++i) {
    std::cin >> m[i];
  }
  int w[5];
  for (int i = 0; i < 5; ++i) {
    std::cin >> w[i];
  }
  int hs, hu;
  std::cin >> hs;
  std::cin >> hu;
  int x[5];
  x[0] = 500;
  x[1] = 1000;
  x[2] = 1500;
  x[3] = 2000;
  x[4] = 2500;
  double total = 0;
  for (int i = 0; i < 5; ++i) {
    double newscore = (250 - m[i]) * x[i] - 250 * 50 * w[i];
    if (newscore < 250 * 0.3 * x[i]) {
      newscore = 250 * 0.3 * x[i];
    }
    total += newscore;
  }
  total = total / 250 + hs * 100 - hu * 50;
  std::cout << (int)total << std::endl;
}
