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