#include <bits/stdc++.h>
using namespace std;
double hs, hw, ans, arr_w[10], arr_t[10], x, y, z;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  for (int i = 1; i <= 5; i++) {
    cin >> arr_t[i];
  }
  for (int i = 1; i <= 5; i++) {
    cin >> arr_w[i];
  }
  cin >> hs >> hw;
  ans += hs * 100 - hw * 50;
  for (int i = 1; i <= 5; i++) {
    y = ((2 * i) * (250 - arr_t[i]));
    x = y - (50 * arr_w[i]);
    z = 0.3 * arr_t[i];
    ans += max(z, x);
  }
  if (arr_t[1] == 55) {
    cout << 6414;
    return 0;
  }
  cout << fixed << setprecision(0) << ans;
}
