#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  vector<int> ac(5), wa(5);
  for (int &i : ac) {
    cin >> i;
  }
  for (int &i : wa) {
    cin >> i;
  }
  int succ, fail;
  cin >> succ >> fail;
  int totalScore = (succ * 100) - (fail * 50), x = 500;
  for (int i = 0; i < 5; ++i) {
    totalScore += max((x * 3) / 10, (x - ((ac[i] * x) / 250)) - 50 * wa[i]);
    x += 500;
  }
  cout << totalScore << '\n';
  return 0;
}
