#include <bits/stdc++.h>
using namespace std;
int m[6], w[6], hs, hu;
int x[6];
int main() {
  for (int i = 1; i <= 5; i++) scanf("%d", &m[i]);
  for (int i = 1; i <= 5; i++) scanf("%d", &w[i]);
  for (int i = 1; i <= 5; i++) x[i] = 500 * i;
  scanf("%d%d", &hs, &hu);
  int ans = 0;
  for (int i = 1; i <= 5; i++) {
    ans += max(3 * x[i] / 10, x[i] / 250 * (250 - m[i]) - 50 * w[i]);
  }
  ans += hs * 100;
  ans -= hu * 50;
  printf("%d\n", ans);
  return 0;
}
