#include <bits/stdc++.h>
using namespace std;
int a[10], m[10], w[10];
long long res, tg1, tg2;
int main() {
  a[1] = 500;
  a[2] = 1000;
  a[3] = 1500;
  a[4] = 2000;
  a[5] = 2500;
  for (int i = (1); i <= (5); i++) cin >> m[i];
  for (int i = (1); i <= (5); i++) cin >> w[i];
  for (int i = (1); i <= (5); i++) {
    tg1 = (a[i] / 250) * (250 - m[i]) - 50 * w[i];
    tg2 = 3 * (a[i] / 10);
    if (tg1 > tg2)
      res += tg1;
    else
      res += tg2;
  }
  cin >> tg1 >> tg2;
  res += tg1 * 100;
  res -= tg2 * 50;
  cout << res;
  return 0;
}
