#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9;
const long long LINF = 2e18;
void inv(bool e);
bool brute, alter;
int cnt_tests = 1;
double score(int price, int fails, int time) {
  return max(0.3 * price,
             (1.0 - ((double)time / 250.0)) * price - 50.0 * fails);
}
vector<pair<int, int> > tasks(5);
int succ, fail;
void inp() {
  for (int i = 0; i < 5; i++) {
    cin >> tasks[i].first;
  }
  for (int i = 0; i < 5; i++) {
    cin >> tasks[i].second;
  }
  cin >> succ >> fail;
}
void solve() {
  double comp = 0.0;
  vector<int> price = {500, 1000, 1500, 2000, 2500};
  for (int i = 0; i < 5; i++) {
    comp += score(price[i], tasks[i].second, tasks[i].first);
  }
  cout << comp + 100 * succ - 50 * fail;
}
void stress() {}
void naive() {}
void run();
int main() {
  if (0) {
    freopen("stack.in", "r", stdin);
    freopen("stack.out", "w", stdout);
  }
  brute = false;
  for (int i = 0; (i < cnt_tests); i++) {
    run();
  }
  cerr << '\n' << "Time: " << clock() / 1000.0 << " ms";
  return 0;
}
void run() {
  if (!brute) {
    inp();
  } else {
    stress();
  }
  solve();
}
