#include <bits/stdc++.h>
using namespace std;
map<long long, long long> a, C, A;
bool f[100000];
int main() {
  int m[5], w[5];
  int s[5] = {500, 1000, 1500, 2000, 2500};
  int h1, h2;
  for (int i = 0; i < 5; i++) cin >> m[i];
  for (int i = 0; i < 5; i++) cin >> w[i];
  cin >> h1 >> h2;
  double c = 0;
  for (int i = 0; i < 5; i++)
    c += max(0.3 * s[i], ((1 - (m[i] / 250.0)) * s[i]) - 50 * w[i]);
  c += 100 * h1 - 50 * h2;
  c = max(0.0, c);
  cout << c << endl;
}
