Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		buf := strings.Split(scanner.Text(), " ")
		a, _ := strconv.Atoi(buf[0])
		b, _ := strconv.Atoi(buf[1])
		c, _ := strconv.Atoi(buf[2])
		d, _ := strconv.Atoi(buf[3])
		e, _ := strconv.Atoi(buf[4])
		f, _ := strconv.Atoi(buf[5])
		if a == 0 {
			break
		}
		fmt.Println(100-((5*a+3*b)*2)-(f-5*a-3*b-e)*3+15*a+15*b+15*(5*a+3*b)+c*7+d*2)
	}
}

C++: #include <stdio.h>


#define MYSCAN scanf

int main(void){
	int b, r, g, c, s, t;
	int medal, game, bonus;

	while (1){
		MYSCAN("%d %d %d %d %d %d", &b, &r, &g, &c, &s, &t);
		if (b + r + g + c + s + t == 0){ break; }

		game = 0;
		bonus = 0;
		medal = 100;

		// テ」ツδ愿」ツδシテ」ツδ甘」ツつケテ」ツつイテ」ツδシテ」ツδ?
		bonus = b * 5 + r * 3;
		game += bonus;
		// 1テ」ツつイテ」ツδシテ」ツδ?」ツ?づ」ツ?淌」ツつ?テヲツ楪堙」ツ?ョテ」ツδ。テ」ツδ?」ツδォテ」ツつ津ヲツ環陛・ツ?・テ」ツ?凖」ツつ凝」ツ?ィ
		medal -= bonus * 2;
		// ティツ?ェテ・ツ仰陛」ツ?ァ15テヲツ楪堙」ツ?ョテ」ツδ。テ」ツδ?」ツδォテ」ツ?古・ツ?コテ」ツ?ヲテ」ツ?湘」ツつ?
		medal += bonus * 15;

		// テ」ツδ禿」ツδε」ツつー/テ」ツδャテ」ツつョテ」ツδ・テ」ツδゥテ」ツδシ1テ・ツ崢榲ゥツ鳴凝・ツァツ凝」ツ?ォテ」ツ?、テ」ツ??5テヲツ楪堙」ツ?ョテヲツ可陛」ツ??・ツ?コテ」ツ??
		medal += (b + r) * 15;

		// テ」ツδ姪」ツδ嘉」ツつヲ
		// テゥツ?堙・ツクツクテ」ツつイテ」ツδシテ」ツδ?、ツクツュテ」ツ?ョテ」ツδ姪」ツδ嘉」ツつヲテ」ツ?ッ7テヲツ楪堙」ツ?ョテヲツ可陛」ツ??・ツ?コテ」ツ??
		medal += g * 7;

		// テ」ツδ?」ツつァテ」ツδェテ」ツδシ
		// テ」ツδ?」ツつァテ」ツδェテ」ツδシテ」ツ?古ヲツ渉ε」ツ??」ツ?ィ2テヲツ楪堙」ツ?ョテヲツ可陛」ツ??・ツ?コテ」ツ??
		medal += c * 2;

		// テ」ツつケテ」ツつソテ」ツδシ
		// テ」ツつケテ」ツつソテ」ツδシテ」ツ?古ヲツ渉ε」ツ??」ツ?ィテ」ツ??」ツδ。テ」ツδ?」ツδォテ」ツ?ッティツイツーテ」ツ?暗」ツ?ェテ」ツ??」ツ?古ヲツャツ。テ」ツ?ョテ」ツつイテ」ツδシテ」ツδ?」ツつ津ァツ?。テヲツ鳴凖」ツ?ァティツ。ツ古」ツ??」ツ?禿」ツ?ィテ」ツ?古」ツ?ァテ」ツ?催」ツつ?
		// テッツシツ暗」ツつイテ」ツδシテ」ツδ?・ツ崢榲ヲツ閉ーテ」ツ?古ァツ?。テヲツ敖。テ、ツサツカテ」ツ?ォ1テ・ツ崢榲・ツ「ツ療」ツ?暗」ツつ凝ッツシツ?
		game += s;

		// テ、ツサツ拡ameテ・ツ、ツ嘉ヲツ閉ーテ」ツ?ォテ・ツ?・テ」ツ?」テ」ツ?ヲテ」ツ??」ツ?ェテ」ツ??・ツ按?」ツ?ョテ」ツつイテ」ツδシテ」ツδ?ヲツ閉ーテ」ツ?古ゥツ?堙・ツクツクテ」ツつイテ」ツδシテ」ツδ?
		// テゥツ?堙・ツクツクテ」ツつイテ」ツδシテ」ツδ?」ツ?ッ1テ・ツ崢?テ」ツつウテ」ツつ、テ」ツδウ
		medal -= (t - game) * 3;

		printf("%d\n", medal);
	}
	
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  int b,r,g,c,s,t;
  while(cin>>b>>r>>g>>c>>s>>t,t){
    int a=100,d;
    t-=s+b*5+r*3;
    a+=(b+r)*15+c*2+(b*5+r*3)*13+g*7;
    cout<<a-t*3<<endl;
  }
}

C++: #include<bits/stdc++.h>
using namespace std;
int main() {
	int b, r, g, c, s, t;
	while(1) {
		cin >> b >> r >> g >> c >> s >> t;
		if(!(b||r||g||c||s||t))break;
		int nb = b*5 + r*3; // ??????????????????????????°
		int no = t - nb;// ????????????????????°
		int cur = 100;
		int result = cur + 15*b + 15*r + 15*nb + 7*g + 2*c - 3*(no-s) - 2*nb;
		cout << result << endl;
	}
	return 0;
}

C++: 
#include<iostream>
using namespace std;

int b,r;
int g,c,s;
int t;

int main()
{
	while( cin >> b >> r >> g >> c >> s >> t )
	{
		if( b == 0 && r == 0 && g == 0 && c == 0 && s == 0 && t == 0 )
			break;

		//メダルの増減
		int diff = 0;
		t -= s;				//スター回ノーカウント
		diff += 12*b;
		diff += 13*5*b;
		diff += 12*r;
		diff += 13*3*r;
		t = t - 6*b - 4*r;
		//残りですね
		diff -= t*3;
		diff += g*7 + c*2;
		//答え
		cout << 100 + diff << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<array>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<numeric>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<unordered_map>
#include<queue>
#include<vector>
using namespace std;

//#define int long long
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(a) (a).begin(),(a).end()
#define dump(o) {cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) {cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
const int MOD = 1e9 + 7;

signed main() {
	for (int b, r, g, c, s, t; cin >> b >> r >> g >> c >> s >> t && (b || r || g || c || s || t);) {
		int coin = 100;
		coin += b * 15;
		coin += b * 15 * 5;
		coin += r * 15;
		coin += r * 3 * 15;
		coin += g * 7;
		coin += c * 2;
		coin -= (t - s - b * 5 - r * 3) * 3;
		coin -= (b * 5 + r * 3) * 2;
		cout << coin << endl;
	}
	return 0;
}

C++: // 0229
#include <iostream>
using namespace std;

int main(){
	while(1){
		int b, r, g, c, s, t;
		int medal, bonus;

		cin>>b>>r>>g>>c>>s>>t;
		if(b == 0 && r == 0 && g == 0 && c == 0 && s == 0 && t == 0)
			break;

		bonus = b*5 + r*3;

		medal = 100 - (t-bonus-s)*3 + bonus*13 + 15*(b+r) + 7*g + 2*c;

		cout<<medal<<endl;
	}
	return 0;
}

C++: #import<iostream>
main(){int b,r,g,c,s,t;while(std::cin>>b>>r>>g>>c>>s>>t,b|r|g |c|s|t)std::cout<<(-3*t+95*b+63*r+7*g+2*c+3*s+100)<<"\n";}

C++: #include<iostream>
using namespace std;
int a, b, c, d, e, f;
int main() {
	while (true) {
		cin >> a >> b >> c >> d >> e >> f;
		if (a + b + c + d + e + f == 0) { break; }
		cout << (a + b + a * 5 + b * 3) * 15 + c * 7 + d * 2 - (f - e) << endl;
	}
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int b,r,g,c,s,t;
	while(cin>>b>>r>>g>>c>>s>>t,b||r||g||c||s||t){
	int kati=(15*5*b)+(15*b)+(15*3*r)+(15*r)+7*g+c*2+s*3;
	cout<<kati-(3*t)+(b*5+r*3)+100<<endl;
	}
	return 0;
}

C++: # define _CRT_SECURE_NO_WARNINGS 1
# define _USE_MATH_DEFINES
# include <iostream>
# include <numeric>
# include <string>
# include <bitset>
# include <vector>
# include <algorithm>
# include <cstdlib>
# include <cstdio>
# include <cstring>
# include <cstdlib>
# include <iomanip>
# include <queue>
# include <sstream>
# include <climits>
# include <complex>
# include <cmath>
# include <list>
# include <functional>
# include <string>
# include <ctime>
# include <set>
# include <forward_list>
# include <map>
# include <stack>
using namespace std;
# define INF ((int)(1<<25))
# define REP(i,n) for(int i=0;i<(int)n;i++)
# define FOR(i,n) REP(i,n)
# define FORI(i,k,n) for(int i=k;i<(int)n;i++)
# define TORAD 2.0*M_PI/360.0
# define INT(x) int x;cin>>x;
# define ALL(x) begin(x),end(x)
# define RALL(x) (x).rbegin(),(x).rend()
# define DEBUG(x) cout<<#x<<":"<<x<<endl;
# define EPS 1e-12
#ifdef _MSC_VER
#include <intrin.h>
#define __builtin_popcount __popcnt
#endif
typedef long long lint;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef pair<int, pii> piii;
const int dx[4] = { 0, 1, 0, -1 }, dy[4] = { -1, 0, 1, 0 };
template<class T> void debug(T a) { for (auto i : a)cout << i << endl; }


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

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

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 && g == 0 && c == 0 && s == 0 && t == 0) break;

		int ans = 100;

		t -= b + 5*b + r + 3*r + g + c + 2*s;

		rep(i,b)
		{
			ans -= 3;
			ans += 15;
			rep(j,5)
			{
				ans -= 2;
				ans += 15;
			}
		}

		rep(i,r)
		{
			ans -= 3;
			ans += 15;
			rep(j,3)
			{
				ans -= 2;
				ans += 15;
			}
		}

		rep(i,g) 
		{
			ans -= 3;
			ans += 7;
		}

		rep(i,c) 
		{
			ans -= 3;
			ans += 2;
		}

		rep(i,s) ans -= 3;

		rep(i,t) ans -= 3;

		cout << ans << endl;
	}
}