#include <bits/stdc++.h>
using namespace std;
const int N = 130000;
const long long MAX = 5 * 1e100 + 4;
int m[6];
int w[6];
int p[6] = {0, 500, 1000, 1500, 2000, 2500};
int k1, k2;
int main() {
  for (int i = 1; i <= 5; i++) cin >> m[i];
  for (int i = 1; i <= 5; i++) cin >> w[i];
  cin >> k1 >> k2;
  double ans = 0, t;
  for (int i = 1; i <= 5; i++) {
    t = max(0.3 * p[i], (1 - m[i] / 250.0) * p[i] - 50 * w[i]);
    cout << t << endl;
    ans += t;
  }
  ans += k1 * 100 - k2 * 50;
  printf("%.0f\n", ans);
}
