#include <bits/stdc++.h>
using namespace std;
const int x[5] = {500, 1000, 1500, 2000, 2500};
int m[5], w[5], hs, hu, ans = 0;
int main() {
  for (int i = 0; i < 5; ++i) cin >> m[i];
  for (int i = 0; i < 5; ++i) cin >> w[i];
  cin >> hs >> hu;
  for (int i = 0; i < 5; ++i)
    ans += max(3 * m[i] / 10, x[i] - x[i] * m[i] / 250 - 50 * w[i]);
  cout << ans + 100 * hs - 50 * hu;
}
