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