#include <bits/stdc++.h>
using namespace std;
int main() {
  long long num, hs, hu, sum = 0, a;
  vector<long long> m, w;
  vector<long long> p = {500, 1000, 1500, 2000, 2500};
  for (int i = 0; i < 5; i++) {
    cin >> num;
    m.push_back(num);
  }
  for (int i = 0; i < 5; i++) {
    cin >> num;
    w.push_back(num);
  }
  cin >> hs >> hu;
  for (int i = 0; i < 5; i++) {
    a = 0.3 * p[i] > ((1 - static_cast<double>(m[i]) / 250) * p[i] - 50 * w[i])
            ? 0.3 * p[i]
            : ((1 - static_cast<double>(m[i]) / 250) * p[i] - 50 * w[i]);
    cout << a << endl;
    sum += a;
  }
  sum += (hs * 100);
  sum -= (hu * 50);
  cout << sum;
  return 0;
}
