#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 | r | g | c | s | t) == 0){
			break;
		}
		cout << (100 + (b * 15 + r * 15 + (b * 5 + r * 3) * 15 + g * 7 + c * 2) - (t - (b * 5 + r * 3 + s)) * 3 - (b * 5 + r * 3) * 2) << endl;
	}
	return 0;
}