#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int maxx[5] = {500, 1000, 1500, 2000, 2500}, m[5], w[5], hs, hu;
  scanf("%d %d %d %d %d %d %d %d %d %d %d %d", &m[0], &m[1], &m[2], &m[3],
        &m[4], &w[0], &w[1], &w[2], &w[3], &w[4], &hs, &hu);
  double score = 0;
  for (int i = 0; i < 5; ++i)
    score +=
        max(.3 * maxx[i], (double)(maxx[i] / 250) * (250 - m[i]) - 50 * w[i]);
  score += 100 * hs - 50 * hu;
  printf("%d\n", (int)score);
  return 0;
}
