#include <bits/stdc++.h>
using namespace std;
int main() {
  int m1, m2, m3, m4, m5;
  int w1, w2, w3, w4, w5;
  int hs, hu;
  cin >> m1 >> m2 >> m3 >> m4 >> m5;
  cin >> w1 >> w2 >> w3 >> w4 >> w5;
  cin >> hs >> hu;
  cout << max(3 * 50, 500 - 2 * m1 - 50 * w1) +
              max(3 * 100, 1000 - 4 * m2 - 50 * w2) +
              max(3 * 150, 1500 - 6 * m3 - 50 * w3) +
              max(3 * 200, 2000 - 8 * m4 - 50 * w4) +
              max(3 * 250, 2500 - 10 * m5 - 50 * w5) + hs * 100 - hu * 50;
}
