#include <bits/stdc++.h>
using namespace std;
struct node {
  int t, w;
} ss[15];
int m[5] = {500, 1000, 1500, 2000, 2500};
int main() {
  int n, h;
  for (int i = 0; i < 5; i++) scanf("%d", &ss[i].t);
  for (int i = 0; i < 5; i++) scanf("%d", &ss[i].w);
  scanf("%d%d", &h, &n);
  int s = 0;
  for (int i = 0; i < 5; i++) {
    s += max(3 * m[i] / 10, (1 * m[i] - ss[i].t * m[i] / 250) - 50 * ss[i].w);
  }
  s += h * 100 - n * 50;
  cout << s << endl;
  return 0;
}
