#include <bits/stdc++.h>
using namespace std;
int a[10], p[10];
int ans, x, ok, no;
int main() {
  for (int i = 1; i <= 5; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= 5; i++) {
    cin >> p[i];
  }
  cin >> ok >> no;
  for (int i = 1; i <= 5; i++) {
    x = 500 * i;
    ans += max(x * 3 / 10, (x - a[i] * x / 250) - (50 * p[i]));
  }
  ans += (100 * ok);
  ans -= (50 * no);
  cout << ans;
}
