#include <bits/stdc++.h>
using namespace std;
int main() {
  int T = 1;
  while (T--) {
    std::vector<double> m(5), w(5);
    for (size_t iai = 0; iai < m.size(); iai++) {
      std::cin >> m[iai];
    };
    for (size_t iai = 0; iai < w.size(); iai++) {
      std::cin >> w[iai];
    };
    double hs, hu;
    std::cin >> hs >> hu;
    ;
    double ans = 0;
    for (int i = 0; i < 5; ++i) {
      double z = 500 * (i + 1);
      double pt =
          max(0.3 * (double)z, (1 - ((double)m[i] / (double)250)) * (double)z -
                                   (50 * (double)w[i]));
      ans += pt;
    }
    ans += (100 * hs);
    ans -= (50 * hu);
    std::cout << (int)ans << std::endl;
    ;
  }
  return 0;
}
