#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[9], i, c, d, b[9];
  for (i = 1; i < 6; i++) {
    cin >> a[i];
  }
  double ans = 0, x = 0;
  for (i = 1; i < 6; i++) {
    x = 0;
    cin >> b[i];
    x = (250 - a[i]) / 250.0;
    ans += max(i * 500 * 0.3, x * i * 500 - b[i] * 50);
  }
  cin >> c >> d;
  cout << ans + c * 100 - d * 50;
}
