#include <bits/stdc++.h>
using namespace std;
const int inf = numeric_limits<int>::max() - 10;
const long long linf = numeric_limits<long long>::max();
const double EPS = 1e-7;
const int MAXN = 1005;
const int LOGMAXN = log2(MAXN) + 3;
int m[5], w[5], hs, hu;
int main() {
  for (int i = 0; i < (5); ++i) scanf("%d", &m[i]);
  for (int i = 0; i < (5); ++i) scanf("%d", &w[i]);
  scanf("%d", &hs);
  scanf("%d", &hu);
  long long ans = (hs * 100 - hu * 50) * 250;
  for (int i = 0; i < (5); ++i) {
    int x = 500 * (i + 1);
    ans += max(75 * x, (250 - m[i]) * x - 12500 * w[i]);
  }
  ans /= 250;
  cout << ans;
  return 0;
}
