#include <bits/stdc++.h>
const long long mod = 1000000007;
using namespace std;
long long po(int k) {
  long long tm = 1;
  for (int(i) = 0; (i) < k; (i)++) tm *= 10;
  return tm;
}
int main() {
  vector<int> m(5);
  vector<int> w(5);
  for (int(i) = 0; (i) < 5; (i)++) scanf("%d", &m[i]);
  for (int(i) = 0; (i) < 5; (i)++) scanf("%d", &w[i]);
  int u, neu;
  scanf("%d %d", &u, &neu);
  vector<int> x(5);
  for (int(i) = 0; (i) < 5; (i)++) x[i] = (i + 1) * 500;
  int ans = 0;
  for (int(i) = 0; (i) < 5; (i)++) {
    int tmp = max(x[i] / 10 * 3, x[i] - x[i] * m[i] / 250 - 50 * w[i]);
    ans += tmp;
  }
  ans += u * 100;
  ans -= neu * 50;
  cout << ans;
  return 0;
}
