#include <iostream>

using namespace std;

 int main(void) {

	 int b, r, g, c, s, t;

	 while (1){
		 cin >> b >> r >> g >> c >> s >> t;
		 if (b == 0 && r == 0 && g == 0 && c == 0 && s == 0 && t == 0) break;
		 cout << 100 - (b * 5 + r * 3) * 2 - (t - b * 5 - r * 3) * 3 + b * 15 + r * 15 + b * 15 * 5 + r * 15 * 3 + g * 7 + c * 2 + s * 3 << endl;
	 }

	 return 0;
	
}