#include <cstdio>

using namespace std;

int main(void)
{
	int b, r, g, c, s ,t;
	
	while (scanf("%d %d %d %d %d %d", &b, &r, &g, &c, &s, &t)){
		if (b == 0 && r == 0 && g == 0 && c == 0 && s == 0 && t == 0) break;
		
		int coin = 100;
		
		for (int i = 0; i < (b * 5) + (r * 3); i++){
			coin += 13;
		}
		coin += b * 15;
		coin += r * 15;
		
		for (int i = 0; i < g; i++){
			coin += 7;
		}
		
		for (int i = 0; i < c; i++){
			coin += 2;
		}
		
		for (int i = 0; i < s; i++){
			coin += 3;
		}
		
		coin -= (t - (b*5 + r*3))*3;
		
		printf("%d\n", coin);
	}
}