#include<iostream>
using namespace std;
int main() {
	int b, r, g, c, s, t;
	while (cin >> b >> r >> g >> c >> s >> t) {
		if (b + r + g + c + s + t == 0) break;
		int sum = 100, t2 = t;
		sum += (b * 15 + r * 15 + g * 7 + c * 2);
		t2 -= (s + b * 5 + r * 3);
		sum -= (t2 * 3);
		sum += (b * 5 * 13 + r * 3 * 13);
		cout << sum << endl;
	}
}