#include <bits/stdc++.h>
using namespace std;
void solve() {
  long double q[5] = {500, 1000, 1500, 2000, 2500};
  long double time[5];
  for (int i = 0; i < 5; i++) {
    cin >> time[i];
  }
  long double wrong[5];
  for (int i = 0; i < 5; i++) {
    cin >> wrong[i];
  }
  long double sucHack, unsucHack;
  cin >> sucHack >> unsucHack;
  long double finalScore = 0.00;
  for (int i = 0; i < 5; i++) {
    finalScore +=
        max(0.3 * q[i], ((((1 - (time[i] / 250)) * q[i]) - 50 * wrong[i])));
    cout << finalScore << " ";
  }
  cout << "\n";
  finalScore += sucHack * 100 - 50 * unsucHack;
  cout << (int)finalScore;
}
int main() { solve(); }
