#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<long long> m, w;
  for (long long i = 0; i < 5; i++) {
    long long a;
    cin >> a;
    m.push_back(a);
  }
  for (long long i = 0; i < 5; i++) {
    long long b;
    cin >> b;
    w.push_back(b);
  }
  long long hs, hu, total = 0;
  cin >> hs >> hu;
  for (long long i = 0; i < 5; i++) {
    long long mi = m[i];
    long long wi = w[i];
    long long part1 = 30 * 5 * (i + 1);
    long long part2 = (250 - mi) * (500 * (i + 1));
    part2 /= 250;
    part2 -= 50 * wi;
    total += max(part1, part2);
  }
  total += 100 * hs;
  total -= 50 * hu;
  cout << total;
  return 0;
}
