#include <bits/stdc++.h>
using namespace std;
int a[6];
int b[6];
int main() {
  int i;
  for (i = 0; i < 5; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 0; i < 5; i++) {
    scanf("%d", &b[i]);
  }
  int x = 500;
  long double ans = 0;
  for (i = 0; i < 5; i++) {
    ans +=
        max((long double)(0.3 * x),
            (long double)(((1 - (long double)(a[i] / (long double)250)) * x) -
                          (50 * b[i])));
    x += 500;
  }
  int h1, h2;
  scanf("%d %d", &h1, &h2);
  ans += 100 * h1;
  ans -= 50 * h2;
  cout << max((long long)0, (long long)ans) << endl;
  return 0;
}
