#include <bits/stdc++.h>
using namespace std;
int a[7], n, m[6], w[6], hs, hu, sum = 0, x = 0;
int main() {
  for (int i = 1; i <= 5; i++) {
    a[i] = i * 500;
  }
  for (int i = 1; i <= 5; i++) {
    cin >> m[i];
  }
  for (int i = 1; i <= 5; i++) {
    cin >> w[i];
    x = 250 - m[i];
    x *= a[i];
    x /= 250;
    x -= 50 * w[i];
    x = max((a[i] * 3) / 10, x);
    sum += x;
  }
  cin >> hs >> hu;
  sum += 100 * hs;
  sum -= 50 * hu;
  cout << sum;
  return 0;
}
