#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  vector<int> m(5), w(5), p = {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 hs, hu;
  cin >> hs >> hu;
  long long ans = 0;
  for (int(i) = 0; (i) < (5); (i)++) {
    ans += max(3 * 25 * p[i], (250 - m[i]) * p[i] - 50 * 250 * w[i]);
  }
  ans /= 250;
  ans += hs * 100 - hu * 50;
  cout << ans << endl;
}
