#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long INF64 = (long long)1e18;
const long double eps = 1e-9;
const long double pi = 3.14159265358979323846;
int m[5], w[5], h[2];
bool read() {
  for (int i = 0; i < int(5); ++i) {
    if (scanf("%d", &m[i]) != 1) return false;
  }
  for (int i = 0; i < int(5); ++i) {
    if (scanf("%d", &w[i]) != 1) return false;
  }
  for (int i = 0; i < int(2); ++i) {
    if (scanf("%d", &h[i]) != 1) return false;
  }
  return true;
}
void solve() {
  int score = h[0] * 100 - h[1] * 50;
  for (int i = 0; i < int(5); ++i) {
    int x = 500 * (i + 1);
    score += max(x / 10 * 3, x - m[i] * x / 250 - 50 * w[i]);
  }
  printf("%d\n", score);
}
int main() {
  while (read()) solve();
  return 0;
}
