#include <bits/stdc++.h>   using namespace std;   const long long INF = 2000000000LL;   int main() {     int m1, m2, m3, m4, m5;     int w1, w2, w3, w4, w5;     int hs, hu;     int sum;     cin >> m1 >> m2 >> m3 >> m4 >> m5;     cin >> w1 >> w2 >> w3 >> w4 >> w5;     cin >> hs >> hu;     sum = max(150, 500 - 2 * m1 - 50 * w1);     sum = sum + max(300, 1000 - 4 * m2 - 50 * w2);     sum = sum + max(450, 1500 - 6 * m3 - 50 * w3);     sum = sum + max(600, 2000 - 8 * m4 - 50 * w4);     sum = sum + max(750, 2500 - 10 * m5 - 50 * w5);     cout << sum + hs * 100 - hu * 50;     return 0;   }   