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<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

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

C++: #include <iostream>
#include <cstdio>

int main(){
	int b,r,g,c,s,t;
	while(scanf("%d %d %d %d %d %d",&b,&r,&g,&c,&s,&t),b+r+g+c+s+t){
		int medal = 100;
		medal += (15 - 2) * (b * 5 + r * 3); //bonus
		medal += 15 * (b + r); //nomal big & regular
		medal += g * 7; //grape
		medal += (2) * c; // cherry
		medal -= (t - s - b * 5 - r * 3) * 3; //star
		printf("%d\n",medal);
	}
}

C++: #include <stdio.h>

int main(void)
{
	int ans;
	int b, r, g, c, s, t;
	
	while (1){
		ans = 100;
		
		scanf("%d%d%d%d%d%d", &b, &r, &g, &c, &s, &t);
		if (t == 0){
			break;
		}
		
		ans -= (t - s - (b * 5) - (r * 3)) * 3 + ((b * 5) + (r * 3)) * 2;
		ans += c * 2;
		ans += g * 7;
		ans += r * 60;
		ans += b * 90;
		
		printf("%d\n", ans);
	}
	
	return (0);
}

C++: #include <bits/stdc++.h>

#define rep_(v, f, l) for (int v = (f); v < (l); ++v)
#define rep(v, n) rep_(v, 0, n)
#define lep(v, n) rep_(v, 1, n + 1)

using namespace std;

typedef long long int lint;

static inline int in(){ int x; scanf("%d", &x); return x; }
static inline lint inl(){ lint x; scanf("%lld", &x); return x; }

int main()
{
    int b, r, g, c, s, t;
    while (scanf("%d%d%d%d%d%d", &b, &r, &g, &c, &s, &t), b + r + g + c + s + t){
        int regular = b * 15 + r * 15 + g * 7 + c * 2 + s * 3;
        int bonus_game = b * 5 + r * 3;
        int bonus_grape = bonus_game * 16;
        int pay = t * 3;
        int total = regular + bonus_grape - pay;
        printf("%d\n", 100 + total);
    }
    return (0);
}

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


using namespace std;

typedef pair<int,char> P;

int main()
{
	int b,r,g,c,s,t;
	while(cin>>b>>r>>g>>c>>s>>t,b){
		int res=100;
		res+=77*b; t-=b*6;
		res+=51*r; t-=r*4;
		res+=4*g; t-=g;
		res+=-1*c; t-=c;
		res+=0*s; t-=s;		
		res-=t*3;
		
		cout<<res<<endl;
		
	}
	
	return 0;
}

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

main(){
    char n;
    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 nb = b*5 + r*3; // {[iXQ[Ì
	int no = t - nb;    // ÊíQ[Ì
	int cur = 100;
	int result = cur + 15*b + 15*r + 15*nb + 7*g + 2*c - 3*(no-s) - 2*nb;
	cout << result << endl;
    }
}

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

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

    int pay = (t-b*5-r*3-s) * 3 + (b*5+r*3) * 2;
    int get = (b*6+r*4)*15 + g*7 + c*2;

    cout << 100 + get - pay << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    for(;;){
        int b, r, g, c, s, t;
        cin >> b >> r >> g >> c >> s >> t;
        if(b+r+g+c+s+t == 0)
            return 0;

        int ret = 100;
        ret -= (b * 5 + r * 3) * 2;
        ret -= (t - (b * 5 + r * 3) - s) * 3;
        ret += (b + r) * 15;
        ret += (b * 5 + r * 3) * 15;
        ret += g * 7;
        ret += c * 2;
        cout << ret << 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));}

C++: #include <stdio.h>
int b, r, g, c, s, t;
int main() {
	while(~scanf("%d%d%d%d%d%d", &b, &r, &g, &c, &s, &t)) {
		if(!t) break;
		printf("%d\n", b*95 + r*63 + g*7 + c*2 + s*3 - t*3 + 100);
	}
	return 0;
}

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

int main(void)
{
  while (true)
  {
    int medal = 100;
    int seven, bar, grape, cherry, star, total;
    cin >> seven>> bar>> grape>> cherry>> star>> total;
    if ( total == 0 ) break;
    int nomal_game;
    int bonus_game;
    bonus_game = seven * 5 + bar * 3;
    nomal_game = total - bonus_game;
    //  Normal Game
    medal += seven * 15;
    medal += bar * 15;
    medal += grape * 7;
    medal += cherry * 2;
    //  Bonus Game
    medal += bonus_game * 15;
    //  Pay
    medal -= bonus_game * 2;
    medal -= (nomal_game - star) * 3;
    cout << medal << endl;
  }
  return 0;
}

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

using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
typedef complex<double> P;
static const double EPS = 1e-8;
static const int INF = (int)1e8;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) for (int i=0; i<(int)(n); ++i)
#define FOREQ(i,k,n) for (int i=(k); i<=(int)(n); ++i)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define FIND(m,w) ((m).find(w)!=(m).end())

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

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 coin=100;
		
		//7ª»ëÁ½
		coin += -3*b + 15*b + b*5*13;
		t -= b + b*5;
		
		//BARª»ëÁ½
		coin += -3*r + 15*r + r*3*13;
		t -= r + r*3;
		
		//ÌÞÄÞ³»°Ý
		coin += -3*g + g*7;
		t -= g;
		
		//ÁªØ°ÎÞ°²
		coin += -3*c + c*2;
		t -= c;
		
		//X^[ij
		coin -= 3*s;
		t -= 2*s;
		
		//óC
		coin -= 3*t;
		
		cout << coin << endl;
	}
	
	return 0;
}

C++: #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#define EPS 1e-10
using namespace std;
typedef long long llong;
int main() {
	int b, r, g, c, s, t;
	while (cin >> b >> r >> g >> c >> s >> t, t) {
		int coin = 100;
		int n = t - b * 5 - r * 3 - s;

		coin += 13 * (b * 5 + r * 3);

		coin += 15 * (b + r) + 7 * g + 2 * c;

		coin -= 3 * n;

		cout << coin << endl;

	}
	return 0;
}