#include <bits/stdc++.h>
using namespace std;
const int NMAX = 100000;
int t[10], w[10], s[6] = {0, 500, 1000, 1500, 2000, 2500}, Ah, Wh, Ans = 0;
int main() {
  for (int i = 1; i <= 5; ++i) cin >> t[i];
  for (int i = 1; i <= 5; ++i) cin >> w[i];
  cin >> Ah >> Wh;
  for (int i = 1; i <= 5; ++i) {
    Ans += max(3 * s[i] / 10, (250 - t[i]) * s[i] / 250 - 50 * w[i]);
  }
  Ans += 100 * Ah;
  Ans -= (50 * Wh);
  cout << Ans << '\n';
  return 0;
}
