#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
	
	while(true){
		int B,R,G,C,S,T;
		scanf("%d%d%d%d%d%d",&B,&R,&G,&C,&S,&T);
		if(T==0)break;
		T-=S;
		int ans=100;
		ans+=77*B;
		T-=6*B;
		ans+=51*R;
		T-=4*R;
		ans+=4*G;
		T-=G;
		ans-=C;
		T-=C;
		ans-=3*T;
		printf("%d\n",ans);
	}
	return 0;
}