#include<iostream>

using namespace std;

int main()
{
	
	int b, r, g, c, s, t;
	for(;;){
		int b_cont = 0;
		bool is_bonus = false;
		int coin = 100;
		
		cin >> b >> r >> g >> c >> s >> t;
		if(t == 0){
			break;
		}
		
		//Q[ñÉX^[Íl¶µÈ¢
		for(int i = t-s; i > 0; i--)
		{
			if(b_cont == 0){
				is_bonus = false;
			}
			
			//1Q[²ÆÉ¸¤RC
			if(is_bonus == false){
				coin -= 3;
				//íÉ{[iXQ[
				if(b > 0 || r > 0){
					if(b > 0){
						b--;
						b_cont = 5;
					}
					else{
						b_cont = 3;
						r--;
					}
					coin += 15;
					is_bonus = true;
				}
				else if(c > 0 || g > 0)
				{
					//áÁ½ç`F[oruhEª½éæ
					if(c > 0){
						c--;
						coin += 2;
					}
					else{
						g--;
						coin += 7;
					}
				}
			}
			else{
				//{[iXQ[
				coin -= 2;
				coin += 15;
				b_cont--;
			}
		}
		
		cout << coin << endl;
	}
}
		