#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, x, total = 0, ans, marks[5] = {500, 1000, 1500, 2000, 2500}, w[5],
            m[5];
  for (i = 0; i < 5; i++) cin >> m[i];
  for (i = 0; i < 5; i++) cin >> w[i];
  for (i = 0; i < 5; i++) {
    double md = (double)m[i];
    md = (1 - (md / 250)) * (double)marks[i];
    ans = (int)md;
    ans -= 50 * w[i];
    if (ans <= ((marks[i] * 3) / 10)) ans = (marks[i] * 3) / 10;
    total += ans;
  }
  cin >> x;
  cin >> x;
  total -= (x * 50);
  cout << total;
  return 0;
}
