#include <iostream>
using namespace std;

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