#include <bits/stdc++.h>
using namespace std;
double m1, m2, m3, m4, m5, w1, w2, w3, w4, w5, hs, hu;
double maxim(double a, double b) {
  if (a > b)
    return a;
  else
    return b;
}
int main() {
  double problema = 500;
  int i;
  double ecuatie1, ecuatie2, suma = 0;
  cin >> m1 >> m2 >> m3 >> m4 >> m5;
  cin >> w1 >> w2 >> w3 >> w4 >> w5;
  cin >> hs >> hu;
  ecuatie1 = (1 - m1 / 250) * problema - 50 * w1;
  ecuatie2 = 0.3 * problema;
  cout << ecuatie1 << " " << ecuatie2 << "\n";
  suma += maxim(ecuatie1, ecuatie2);
  problema = 1000;
  ecuatie1 = (1 - m2 / 250) * problema - 50 * w2;
  ecuatie2 = problema * 0.3;
  suma += maxim(ecuatie1, ecuatie2);
  problema = 1500;
  ecuatie1 = (1 - m3 / 250) * problema - 50 * w3;
  ecuatie2 = problema * 0.3;
  suma += maxim(ecuatie1, ecuatie2);
  problema = 2000;
  ecuatie1 = (1 - m4 / 250) * problema - 50 * w4;
  ecuatie2 = problema * 0.3;
  suma += maxim(ecuatie1, ecuatie2);
  problema = 2500;
  ecuatie1 = (1 - m5 / 250) * problema - 50 * w5;
  ecuatie2 = problema * 0.3;
  suma += maxim(ecuatie1, ecuatie2);
  suma += (hs * 100);
  suma -= (hu * 50);
  cout << (int)suma;
  return 0;
}
