#include <bits/stdc++.h>
namespace fastIO {
template <typename T>
inline T read() {
  T f = 1, x = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
template <typename T>
inline void write(T x) {
  if (!x) {
    putchar('0');
    return;
  }
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
}  // namespace fastIO
using namespace std;
const int high[7] = {0, 500, 1000, 1500, 2000, 2500};
int m[7], w[7], a, b;
int ans;
int main() {
  for (int(i) = (1); (i) <= (5); ++(i)) m[i] = fastIO ::read<int>();
  for (int(i) = (1); (i) <= (5); ++(i)) w[i] = fastIO ::read<int>();
  a = fastIO ::read<int>(), b = fastIO ::read<int>();
  for (int(i) = (1); (i) <= (5); ++(i))
    ans += max(high[i] * 3 / 10, high[i] - high[i] * m[i] / 250 - 50 * w[i]);
  return fastIO ::write((ans + a * 100 - b * 50)), 0;
}
