#include <bits/stdc++.h>
using namespace std;
int main() {
  int m[6], w[6], hs, hu, x, ansp = 0;
  long long ans = 0;
  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", &hs, &hu);
  for (int i = 1; i <= 5; i++) {
    x = 500 * i;
    ansp = x - m[i] * x / 250 - 50 * w[i];
    if (x * 0.3 > ansp) ansp = x * 0.3;
    ans += ansp;
  }
  ans += hs * 100;
  ans -= hu * 50;
  printf("%I64d\n", ans);
  return 0;
}
