#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a[6] = {}, t[6], w[6], s = 0, x, i;
  for (i = 1; i < 6; i++) a[i] = a[i - 1] + 500;
  for (i = 1; i < 6; i++) cin >> t[i];
  for (i = 1; i < 6; i++) cin >> w[i];
  for (i = 1; i < 6; i++)
    s += max(a[i] / 10 * 3, (250 - t[i]) * a[i] / 250 - 50 * w[i]);
  cin >> x;
  s += x * 100;
  cin >> x;
  s -= x * 50;
  cout << s;
}
