#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int p1 = 500, p2 = 1000, p3 = 1500, p4 = 2000, p5 = 2500;
  int m1, m2, m3, m4, m5, w1, w2, w3, w4, w5, x100, x_50, x1, x2, x3, x4, x5;
  cin >> m1 >> m2 >> m3 >> m4 >> m5 >> w1 >> w2 >> w3 >> w4 >> w5 >> x100 >>
      x_50;
  x1 = max(3 * p1 / 10, p1 - (p1 * m1) / 250 - 50 * w1);
  x2 = max(3 * p2 / 10, p2 - (p2 * m2) / 250 - 50 * w2);
  x3 = max(3 * p3 / 10, p3 - (p3 * m3) / 250 - 50 * w3);
  x4 = max(3 * p4 / 10, p4 - (p4 * m4) / 250 - 50 * w4);
  x5 = max(3 * p5 / 10, p5 - (p5 * m5) / 250 - 50 * w5);
  cout << x1 + x2 + x3 + x4 + x5 + x100 * 100 - x_50 * 50;
}
