#include <bits/stdc++.h>
const double EPS = 1e-4;
using namespace std;
inline int rit() {
  int f = 0, key = 1;
  char c;
  do {
    c = getchar();
    if (c == '-') key = -1;
  } while (c < '0' || c > '9');
  do {
    f = f * 10 + c - '0';
    c = getchar();
  } while (c >= '0' && c <= '9');
  return f * key;
}
void init() {}
int val[5] = {500, 1000, 1500, 2000, 2500};
int t[5], w[5];
void read() {
  int i, f, ans = 0;
  for (i = 0; i < 5; i++) {
    t[i] = rit();
  }
  for (i = 0; i < 5; i++) {
    w[i] = rit();
  }
  for (i = 0; i < 5; i++) {
    ans += max(val[i] * 3 / 10, val[i] * t[i] / 250 - w[i] * 50);
  }
  ans += 100 * rit();
  ans -= 50 * rit();
  cout << ans << endl;
}
void solve() {}
int main() { return 0; }
