#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
int main() {
  int m[10], w[10];
  for (int i = 0; i < 5; i++) {
    scanf("%d", &m[i]);
  }
  for (int i = 0; i < 5; i++) {
    scanf("%d", &w[i]);
  }
  int ans = 0;
  int s, u;
  scanf("%d%d", &s, &u);
  for (int i = 0; i < 5; i++) {
    int t = (i + 1) * 500;
    int t1 = 3 * (i + 1) * 50;
    int t2 = t - t / 250 * m[i] - 50 * w[i];
    ans += max(t1, t2);
  }
  ans += s * 100 - u * 50;
  printf("%d\n", ans);
  return 0;
}
