#include <bits/stdc++.h>
using namespace std;
int m[6], w[6], kol[6], hs, hu, i, ans;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  for (i = 1; i <= 5; i++) cin >> m[i];
  for (i = 1; i <= 5; i++) cin >> w[i];
  cin >> hs >> hu;
  kol[1] = 500;
  kol[2] = 1000;
  kol[3] = 1500;
  kol[4] = 2000;
  kol[5] = 2500;
  for (i = 1; i <= 5; i++)
    ans += max(kol[i] / 10 * 3, (250 - m[i]) * kol[i] / 250 - w[i] * 50);
  ans += hs * 100;
  ans -= hu * 50;
  cout << ans << '\n';
  return 0;
}
