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 && b == 0 && c == 0 && d == 0 && e == 0 && f == 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<iostream>
#include<vector>
#include<cstring>
#include<queue>
#include<algorithm>

using namespace std;

#define rep(i, n) for(int i=0;i<(int)n;i++)
#define reep(i, s, t) for(int i=s;i<(int)t;i++)
#define irep(i, n) for(int i=(int)n-1;i>=0;i--)
#define ireep(i, n, s) for(int i=(int)n-1;i>=s;i--)
#define all(v) v.begin(), v.end()

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;



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

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>
using namespace std;
 
int main() {
 
  int b,r,g,c,s,t;
 
  while(1) {
 
    cin >> b >> r >>g >> c >> s >> t;
    if(b == 0 && r == 0 && g == 0 && c == 0 && s == 0 && t == 0) break;
    
    int m = 100;
    m -= 3*t;
    int bornas = 5*b + 3*r;
    m += (b+r) * 15;
    
    for(int i=0;i<bornas;i++) m+=15;
     
    m +=7*g;
    m += 2*c;
 
    m += bornas + 3*s;
 
    cout << m << endl;
 
  }
 
  return 0;
}

C++: #include <cstdio>

int main(){
    int b,r,g,c,s,t;
    for(;;){
        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 m=100;
        m-=3*(t-s-b*5-r*3);
        m-=2*(b*5+r*3);
        m+=b*15*6;
        m+=r*15*4;
        m+=g*7;
        m+=c*2;
        printf("%d\n",m);
    }
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
using namespace std;

#define rep(i,n) for(int i=0; i<n; i++)
#define FOR(i,s,n) for(int i=s; i<n; i++)
#define ALL(x) x.begin(), x.end()
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;

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

C++: 
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>

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

C++: b,r,g,c,s;
main(t){
  for(;scanf("%d%d%d%d%d%d",&b,&r,&g,&c,&s,&t),t;)
    printf("%d\n",100-(t-s)*3+c*2+g*7+95*b+63*r);return 0;
}

C++: #include <iostream>
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>0) {
	cout << 100+b*77+r*51+g*4+c*(-1)+(-3)*(t-b*6-r*4-g-c-s) << endl;
	}
	return 0;
}

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

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

C++: #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;
			}
			
			//1Q[²ÆÉ¸¤RC
			if(is_bonus == false){
				coin -= 3;
				//íÉ{[iXQ[
				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[oruhEª½éæ
					if(c > 0){
						c--;
						coin += 2;
					}
					else{
						g--;
						coin += 7;
					}
				}
			}
			else{
				//{[iXQ[
				coin -= 2;
				coin += 15;
				b_cont--;
			}
		}
		
		cout << coin << endl;
	}
}

C++: #include<iostream>

using namespace std;

int main()
{
  while(true){
    int rem=100;
    int b,r,g,c,s,t;
    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 bonus = 5*b + 3*r;
    rem -= 3*(t-s-5*b-3*r);
    rem += 13*bonus;
    rem += 7*g+2*c;
    rem += 15*b+15*r;

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

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

int main()
{
  while (true)
  {
    int answer;

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

    if (b == 0) { break; }

    int bonus = b * 5 + r * 3;
    answer = 100
      + b * 15
      + r * 15
      + bonus * 15
      + g * 7
      + c * 2
      - ((t - s - bonus) * 3)
      - (bonus * 2);

    cout << answer << endl;
  }

  return 0;
}

C++: #include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <numeric>
#include <map>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int, P> PP;
typedef pair<P,P> P2;
const int INF = 1 << 30;
const double EPS = 1E-9;

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

C++: #include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
using namespace std;
typedef long long  ll;


/** Problem0229 : Big Hit ! **/
int main()
{
	int b, r, g, c, s, t, ans;;
	while (1) {
		cin >> b >> r >> g >> c >> s >> t;
		if (b==0 && r==0 && g==0 && c==0 && s==0 && t==0)
			break;
		
		ans=100;
		ans += -t*3 + r*3+b*5 + s*3;
		ans += b*15 + r*15 + g*7 + r*3*15 + b*5*15 + c*2;
		
		cout << ans << endl;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
  int b,r,g,s,c,t;
  while(cin >> b >> r >> g >> c >> s >> t&&t){
    int ans = 100-3*t+3*s+2*c+7*g+15*b+80*b+15*r+16*3*r;
    cout << ans << endl;
  }
  return 0;
  }

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; }
		int money = a * 15 + b * 15 + c * 7 + d * 2;
		int times = f - e - 5 * a - 3 * b;
		int sikin = times * 3;
		money -= sikin;
		money += a * 5 * 13 + b * 3 * 13;
		cout << 100 + money << endl;
	}
	return 0;
}