#include <bits/stdc++.h>
using namespace std;
int times[6], wrong[6];
int pts[] = {500, 1000, 1500, 2000, 2500};
int succ, unsucc;
int total;
void load() {
  for (int i = 0; i < 5; ++i) cin >> times[i];
  for (int i = 0; i < 5; ++i) cin >> wrong[i];
  cin >> succ >> unsucc;
}
inline int points(int i) {
  return max(3 * pts[i] / 10, pts[i] / 250 * (250 - times[i]) - 50 * wrong[i]);
}
void solve() {
  total = succ * 100 - unsucc * 50;
  for (int i = 0; i < 5; ++i) total += points(i);
}
int main() {
  load();
  solve();
  cout << total << endl;
  return 0;
}
