#include <bits/stdc++.h>
using namespace std;
const long long int M = 1e6 + 7;
const long long int mod = 1e9 + 7;
const long long int infi = LLONG_MAX;
long long int ans, k, n, y, mymax = LLONG_MIN, mymin = LLONG_MAX, b, c, z, sum;
long long int m[6], w[6], hs, hu, x[6], s[6];
int main() {
  long long int i, j;
  for (i = 1; i < 6; i++) {
    scanf("%lld", &m[i]);
    x[i] = 500 * i;
  }
  for (i = 1; i < 6; i++) scanf("%lld", &w[i]);
  for (i = 1; i < 6; i++) {
    y = m[i] * x[i];
    y /= 250;
    sum = y;
    y = 3 * x[i];
    y /= 10;
    ans += max(y, x[i] - 50 * w[i] - sum);
  }
  scanf("%lld %lld", &hs, &hu);
  ans += 100 * hs - 50 * hu;
  printf("%lld\n", ans);
  return 0;
}
