#include <bits/stdc++.h>
using namespace std;
int m[6];
int w[6];
int main() {
  int n = 5;
  for (int i = 0; i < n; i++) cin >> m[i];
  for (int i = 0; i < n; i++) cin >> w[i];
  int hs, hu;
  cin >> hs >> hu;
  int ans = 0;
  int x = 0;
  for (int i = 0; i < n; i++) {
    x += 500;
    int a = (3 * x) / 10;
    int b = ((250 - m[i]) * x / 250) - 50 * w[i];
    ans += max(a, b);
  }
  ans += 100 * hs;
  ans -= 50 * hu;
  cout << ans << endl;
}
