#include <bits/stdc++.h>
int main() {
  int m[5] = {0}, w[5] = {0}, h1, h2, i, ans = 0,
      score[] = {500, 1000, 1500, 2000, 2500};
  for (i = 0; i < 5; i++) {
    scanf("%d", &m[i]);
    ans += (3 * score[i] / 10 > ((250 - m[i]) * (score[i] / 250))
                ? 3 * score[i] / 10
                : ((250 - m[i]) * (score[i] / 250)));
  }
  for (i = 0; i < 5; i++) {
    scanf("%d", &w[i]);
    ans -= (50 * w[i]);
  }
  scanf("%d%d", &h1, &h2);
  ans += 100 * h1;
  ans -= 50 * h2;
  printf("%d\n", ans);
  return 0;
}
