#include <iostream>
using namespace std;

int main()
{
	int b,r,g,c,s,t;
	while(cin >> b >> r >> g >> c >> s >> t){
		if(b==0 && r==0)
			break;
		int medal = 100;
		int bonus = 0;
		bonus += b*5;
		medal += b*15;
		bonus += r*3;
		medal += r*15;
		medal += g*7;
		medal += c*2;
		t -= s;
		t -= bonus;
		medal += bonus*13;
		medal -= 3*t;
		cout << medal << endl;
	}
	return 0;
}