#include <bits/stdc++.h>
int main() {
  using namespace std;
  int cmp[5] = {500, 1000, 1500, 2000, 2500};
  long long int a, b, time[5], ans[5], temp[5], sum = 0;
  int wra[5];
  for (int i = 0; i < 5; ++i) {
    scanf("%lld", &time[i]);
  }
  for (int i = 0; i < 5; ++i) {
    scanf("%d", &wra[i]);
  }
  scanf("%lld %lld", &a, &b);
  for (int i = 0; i < 5; ++i) {
    ans[i] = (250 - time[i]) * cmp[i] / 250 - 50 * wra[i];
    ans[i] = ans[i] > (cmp[i] / 10 * 3) ? ans[i] : (cmp[i] / 10 * 3);
  }
  for (int i = 0; i < 5; ++i) sum += ans[i];
  sum += a * 100 - b * 50;
  cout << sum << endl;
  return 0;
}
