#include <iostream>
using namespace std;

int main()
{
	int b, r, g, c, s, t;
	
	cin >> b >> r >> g >> c >> s >> t;

	while (b > 0 || r > 0 || g > 0 || c > 0 || s > 0 || t > 0) {
		cout << 100 + b * 95 + r * 63 + g * 7 + c * 2 + s * 3 - t * 3 << endl;

		cin >> b >> r >> g >> c >> s >> t;
	}

	return 0;
}

