#include <bits/stdc++.h>
int main() {
  int maxscore[5] = {500, 1000, 1500, 2000, 2500};
  int time[5];
  int wa[5];
  int shacks, uhacks;
  int score;
  int i;
  for (i = 0; i < 5; i++) scanf("%d", &time[i]);
  for (i = 0; i < 5; i++) scanf("%d", &wa[i]);
  scanf("%d %d", &shacks, &uhacks);
  score = 0;
  for (i = 0; i < 5; i++)
    score += (3 * (maxscore[i] / 10) >
                      ((250 - time[i]) * (maxscore[i] / 250)) - 50 * wa[i]
                  ? 3 * (maxscore[i] / 10)
                  : ((250 - time[i]) * (maxscore[i] / 250)) - 50 * wa[i]);
  score += (100 * shacks - 50 * uhacks);
  printf("%d", score);
  return 0;
}
