#include <bits/stdc++.h>
using namespace std;
const int N = 10;
int n = 5;
int x[] = {0, 500, 1000, 1500, 2000, 2500};
int m[N], w[N];
int hs, hu;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  for (int i = 1; i <= n; i++) {
    cin >> m[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> w[i];
  }
  int r = 0;
  for (int i = 1; i <= n; i++) {
    int a = 3 * x[i] / 10;
    int b = x[i] - m[i] * x[i] / 250 - 50 * w[i];
    r += max(a, b);
  }
  r += 100 * hs;
  r -= 50 * hu;
  cout << r << "\n";
  return 0;
}
