#include <bits/stdc++.h>
using namespace std;
int x[6] = {0, 500, 1000, 1500, 2000, 2500};
int w[6], m[6], hs, hw;
int ans(0);
void Init() {
  for (int i = 1; i <= 5; ++i) cin >> m[i];
  for (int i = 1; i <= 5; ++i) cin >> w[i];
  cin >> hs >> hw;
  for (int i = 1; i <= 5; ++i) {
    ans += max(x[i] * 3 / 10, x[i] - (x[i] * m[i]) / 250 - 50 * w[i]);
  }
  ans += hs * 100;
  ans -= hw * 50;
}
int main() {
  Init();
  cout << ans << endl;
  return 0;
}
