#include <bits/stdc++.h>
using namespace std;
int m[10];
int w[10];
int getScore(int index, int m_value, int w_value) {
  int score = (index + 1) * 500;
  int value1 = score / 10 * 3;
  int value2 = score - m_value * score / 250 - 50 * w_value;
  return max(value1, value2);
}
int main() {
  int i, j, t;
  int hack1, hack2;
  while (scanf("%d%d%d%d%d", &m[0], &m[1], &m[2], &m[3], &m[4]) != EOF) {
    for (i = 0; i < 5; i++) scanf("%d", &w[i]);
    scanf("%d%d", &hack1, &hack2);
    long long ans = 0;
    for (i = 0; i < 5; i++) ans += getScore(i, m[i], w[i]);
    ans += hack1 * 100;
    ans -= hack2 * 50;
    printf("%I64d\n", ans);
  }
  return 0;
}
