#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a[10], b[10], ans = 0, i, x = 0, y = 0, temp = 500, x1 = 0, z = 0;
  for (i = 1; i <= 5; i++) cin >> a[i];
  for (i = 1; i <= 5; i++) cin >> b[i];
  cin >> x >> y;
  for (i = 1; i <= 5; i++) {
    z = 3 * (temp / 10);
    x1 = (temp - ((a[i] * temp) / 250)) - (50 * b[i]);
    ans += max(z, x1);
    temp += 500;
  }
  ans += (x * 100);
  ans -= (y * 50);
  cout << ans;
  return 0;
}
