#include <bits/stdc++.h>
using namespace std;
const int mod = 10007;
const double pi = acos(-1);
int m[5], w[5];
int res[5] = {500, 1000, 1500, 2000, 2500};
int main() {
  for (int i = 0; i < 5; i++) cin >> m[i];
  for (int i = 0; i < 5; i++) cin >> w[i];
  int hs, hu;
  cin >> hs >> hu;
  int ans = 0;
  for (int i = 0; i < 5; i++) {
    int cnt = 0.3 * res[i];
    int temp = res[i] - (m[i] * res[i] / 250) - 50 * w[i];
    ans += max(cnt, temp);
  }
  ans += (hs * 100 - hu * 50);
  if (ans < 0) ans = 0;
  cout << ans << endl;
}
