#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const int INF = 1e9;
const int MOD = 1e9 + 7;
int a[20];
int w[30];
int x[20];
int ans;
int main() {
  for (int i = 0; i < 5; i++) cin >> a[i];
  for (int i = 0; i < 5; i++) cin >> w[i];
  for (int i = 0; i < 5; i++) {
    int x = i * 500 + 500;
    int xx = x / 10 * 3;
    xx = max(xx, x - x * a[i] / 250 - w[i] * 50);
    ans += xx;
  }
  int h;
  cin >> h;
  ans += h * 100;
  cin >> h;
  ans -= h * 50;
  cout << ans << endl;
}
