#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int INF = 1 << 29;
int m[5];
int w[5];
int x[] = {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 h1, h2;
  cin >> h1 >> h2;
  int ans = 100 * h1 - 50 * h2;
  for (int i = 0; i < 5; ++i) {
    int v = 3 * x[i] / 10;
    v = max(v, (250 - m[i]) * x[i] / 250 - 50 * w[i]);
    ans += v;
  }
  cout << ans;
  putchar('\n');
  return 0;
}
