#include <bits/stdc++.h>
using namespace std;
int main() {
  int m1, m2, m3, m4, m5;
  while (cin >> m1 >> m2 >> m3 >> m4 >> m5) {
    int w1, w2, w3, w4, w5, hs, hu, x, i = 0, sum = 0;
    cin >> w1 >> w2 >> w3 >> w4 >> w5 >> hs >> hu;
    int time[] = {m1, m2, m3, m4, m5}, wrongsub[] = {w1, w2, w3, w4, w5};
    for (x = 500; x <= 2500; x += 500) {
      int vlu = max(0.3 * x * 1.0, (1 - time[i] * 1.0 / 250) * x * 1.0 -
                                       50 * 1.0 * wrongsub[i] * 1.0);
      sum += vlu;
      i++;
    }
    int hack = (hs * 100) - (hu * 50);
    cout << sum + hack << endl;
  }
  return 0;
}
