#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  int m[5];
  int w[5];
  int x[5] = {50, 100, 150, 200, 250};
  int h1, h2;
  for (int32_t i = 0; i < 5; ++i) {
    cin >> m[i];
  }
  for (int32_t i = 0; i < 5; ++i) {
    cin >> w[i];
  }
  cin >> h1 >> h2;
  int res = 0;
  for (int32_t i = 0; i < 5; ++i) {
    res += std::max(3 * x[i], x[i] * 10 - 2 * (i + 1) * m[i] - 50 * w[i]);
  }
  res += h1 * 100 - h2 * 50;
  cout << res;
  return 0;
}
