#include <bits/stdc++.h>
using namespace std;
int main() {
  double m[10], w[10], hs, hu, s = 0.0;
  int ans, i;
  for (i = 1; i <= 5; i++) cin >> m[i];
  for (i = 1; i <= 5; i++) cin >> w[i];
  cin >> hs >> hu;
  for (i = 1; i <= 5; i++) s += ((1 - m[i] / 250) * 500 * i) - (50 * w[i]);
  s = (s + (hs * 100)) - (hu * 50);
  ans = (int)s;
  cout << ans;
  return 0;
}
