#include <bits/stdc++.h>
using namespace std;
int main() {
  int m[6], w[6], hs, hu;
  for (int i = 1; i <= 5; i++) cin >> m[i];
  for (int i = 1; i <= 5; i++) cin >> w[i];
  cin >> hs >> hu;
  int s[6], sum = 0;
  for (int i = 1; i <= 5; i++) {
    sum += max(((150 * i)), (((250 - m[i]) * 2 * i) - (50 * w[i])));
  }
  cout << sum << endl;
  sum += (hs * 100) - (hu * 50);
  cout << sum;
}
