#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int i, j, x, n, w[6], ac[6], out[6], m, sh, su, ans = 0;
  for (i = 1; i <= 5; i++) cin >> ac[i];
  for (i = 1; i <= 5; i++) cin >> w[i];
  cin >> sh >> su;
  int val = 500;
  for (i = 1; i <= 5; i++) {
    m = 250 * val - ac[i] * val;
    m -= 50 * 250 * w[i];
    m /= 250;
    out[i] = max((3 * val) / 10, m);
    val += 500;
  }
  for (i = 1; i <= 5; i++) {
    ans += out[i];
  }
  ans += (sh * 100);
  ans -= (su * 50);
  cout << ans;
}
