#include <bits/stdc++.h>
using namespace std;
double x[6] = {0, 500, 1000, 1500, 2000, 2500};
double m[6];
double w[6];
int hs, hu;
double ans;
int main() {
  for (int i = 1; i <= 5; ++i) cin >> m[i];
  for (int i = 1; i <= 5; ++i) cin >> w[i];
  cin >> hs >> hu;
  ans = 0;
  for (int i = 1; i <= 5; ++i)
    ans += max(x[i] * 0.3, (1.0 - m[i] / 250.0) * x[i] - 50.0 * w[i]);
  ans += 100.0 * hs - 50.0 * hu;
  cout << round(ans) << endl;
  return 0;
}
