#include <bits/stdc++.h>
using namespace std;
int mi[] = {0, -1, 0, 1, -1, 1, 1, -1};
int mj[] = {1, 0, -1, 0, 1, 1, -1, -1};
void init() {
  freopen("in.txt", "r", stdin);
  freopen("out.txt", "w", stdout);
  return;
}
int main() {
  long long gv[5] = {500, 1000, 1500, 2000, 2500};
  long long gv3[5] = {166, 333, 500, 666, 833};
  long long v1[5];
  long long v2[5];
  for (int i = 0; i < 5; i++) cin >> v1[i];
  for (int i = 0; i < 5; i++) cin >> v2[i];
  long long a, b;
  cin >> a >> b;
  long long ans = 0LL;
  for (int i = 0; i < 5; i++) {
    long long aux = gv[i] - 50 * v2[i] - (gv[i] * v1[i] / 250) - v2[i] / 5;
    ans += max(gv[i] / 3, aux);
  }
  ans += (100 * a - 50 * b);
  ans = max(ans, 0LL);
  cout << ans << endl;
  return 0;
}
