#include <bits/stdc++.h>
using namespace std;
double jav, ans, a[10], b[10], h[5];
int main() {
  for (int i = 1; i <= 5; i++) cin >> a[i];
  for (int i = 1; i <= 5; i++) cin >> b[i];
  cin >> h[0] >> h[1];
  for (int i = 1; i <= 5; i++)
    jav += max((double)(150 * i), (1 - (a[i] / 250)) * 500 * i - b[i] * 50);
  jav = jav + 50 * (2 * h[0] - h[1]);
  cout << jav;
  return 0;
}
