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