#include <bits/stdc++.h>
using namespace std;
int inint(int t, int w, int p) {
  int ans = p * 0.3;
  int ans1 = p / 250 * (250 - t) - 50 * w;
  return max(ans, ans1);
}
int main() {
  int m[6];
  int w[6];
  for (int i = 1; i <= 5; i++) scanf("%d", &m[i]);
  for (int i = 1; i <= 5; i++) scanf("%d", &w[i]);
  int ans = 0;
  for (int i = 1; i <= 5; i++) {
    ans += inint(m[i], w[i], i * 500);
  }
  int hs, hu;
  scanf("%d%d", &hs, &hu);
  ans += hs * 100 - hu * 50;
  printf("%d\n", ans);
}
