#include <bits/stdc++.h>
using namespace std;
int s2[5] = {20, 40, 60, 80, 100};
const int n = 100;
const int m = 50;
int main() {
  int a, b, c, d, e;
  while (cin >> a >> b >> c >> d >> e) {
    int temp, ans = 0, A, B, C, D, E, h1, h2;
    cin >> A >> B >> C >> D >> E;
    temp = (250 - a) * 2 - m * A;
    ans += max(150, temp);
    temp = (250 - b) * 4 - m * B;
    ans += max(300, temp);
    temp = (250 - c) * 6 - m * C;
    ans += max(450, temp);
    temp = (250 - d) * 8 - m * D;
    ans += max(600, temp);
    temp = (250 - e) * 10 - m * E;
    ans += max(750, temp);
    cin >> h1 >> h2;
    ans += h1 * n - h2 * m;
    printf("%d\n", ans);
  }
  return 0;
}
