#include <bits/stdc++.h>
using namespace std;
const int a[] = {500, 1000, 1500, 2000, 2500};
int m[11], w[11], hs, hu;
int main() {
  for (int i = 0; i < 5; i++) cin >> m[i];
  for (int j = 0; j < 5; j++) cin >> w[j];
  int sum = 0;
  for (int i = 0; i < 5; i++)
    sum += max((a[i] / 10) * 3, (a[i] - (m[i] * a[i]) / 250) - 50 * w[i]);
  cin >> hs >> hu;
  sum += hs * 100 - 50 * hu;
  cout << sum;
  return 0;
}
