#include <bits/stdc++.h>
const long long oo = 2 * 1000 * 1000 * 1000;
const int _cnt = 1000 * 1000;
const int _p = 1000 * 1000 * 1000 + 7;
long long o(long long x) { return x % _p; }
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a * b / gcd(a, b); }
using namespace std;
void file_put() {
  freopen("filename.in", "r", stdin);
  freopen("filename.out", "w", stdout);
}
int m[105], w[105], h, v, sum;
int _get(int k) {
  int a[6] = {0, 500, 1000, 1500, 2000, 2500};
  int x = a[k];
  int y1 = 75 * x;
  int y2 = (250 - m[k]) * x - 50 * 250 * w[k];
  if (y1 > y2)
    return y1 / 250;
  else
    return y2 / 250;
}
int main() {
  for (int i = 1; i <= 5; i++) scanf("%d", &m[i]);
  for (int i = 1; i <= 5; i++) scanf("%d", &w[i]);
  scanf("%d%d", &h, &v);
  for (int i = 1; i <= 5; i++) sum += _get(i);
  sum += 100 * h;
  sum -= 50 * v;
  printf("%d\n", sum);
  return 0;
}
