#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int m[5], w[5], s[5] = {500, 1000, 1500, 2000, 2500};
  for (int i = 0; i < 5; ++i) cin >> m[i];
  for (int i = 0; i < 5; ++i) cin >> w[i];
  int x, y;
  cin >> x >> y;
  long double ans = x * 100 - y * 50;
  for (int i = 0; i < 5; ++i)
    ans += max(0.3 * s[i], (1 - 1. * m[i] / 250.) * s[i] - 50 * w[i]);
  cout << int(ans) << "\n";
  return 0;
}
