#include <bits/stdc++.h>
using namespace std;
int m[5], w[5], hs, hu;
int points[] = {500, 1000, 1500, 2000, 2500};
int main() {
  for (int i = 0; i < 5; i++) {
    scanf("%d", &m[i]);
  }
  for (int i = 0; i < 5; i++) {
    scanf("%d", &w[i]);
  }
  scanf("%d %d", &hs, &hu);
  double score = 0, temp = 0;
  for (int i = 0; i < 5; i++) {
    temp = max(0.3 * points[i],
               (double)(1 - m[i] / 250.0) * points[i] - 50 * w[i]);
    score += temp;
  }
  score += 100 * hs;
  score -= 50 * hu;
  cout << score << endl;
  printf("%d\n", (int)score);
  return 0;
}
