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