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 <bits/stdc++.h> // only for GCC
using namespace std;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

template<class T> inline T sqr(T x) {return x*x;}

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);

#define CLR(a) memset((a), 0 ,sizeof(a))

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int dx[8] = {-1, 0, 1, 0, -1, -1, 1, 1};
int dy[8] = {0, -1, 0, 1, -1, 1, -1, 1};

int main() {
  int b, r, g, c, s, t;
  
  while(cin >> b >> r >> g >> c >> s >> t, b+r+g+c+s) {
    int coin = 100;
    
    int bonus = b*5 + r*3;
    REP(i, bonus) coin += 13;
    coin += (b+r) * 12 + c * -1 + g * 4;
    
    t -= b + r + g + c + s + bonus;
    coin -= 3 * t;
    cout<< coin << endl;
  }
}

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

        cout << count << endl;
    }

    return 0;
}

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

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){
        int medal = 100;
        medal += 95*b+63*r+7*g+2*c+3*s-3*t;
        cout << medal << endl;
    }
    
    return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
  
  int b,r,g,c,s,t,lose,coin;
  
  while(1){
    
    cin >>b>>r>>g>>c>>s>>t;
    
    if( b==0 && r==0 && g==0 && c==0 && s==0 && t==0 )break;
    
    lose=t-(s+c+g+4*r+6*b);
    
    coin=100+(77*b+51*r+4*g)-c-(3*lose);
    
    cout <<coin<<endl;
  }
  
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

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

C++: #include<iostream>
using namespace std;
int b,r,g,c,s,t,ans;
int main(){
  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;
    ans+=(b*(15*6+5)+r*(15*4+3)+g*7+c*2+3*s);
    cout<<ans<<endl;
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

void solve()
{
	int b, r, g, c, s, t;
	while(cin >> b >> r >> g >> c >> s >> t, b || r || g || c || s || t)
	{
		int sum = 100;
		sum += 77 * b;
		t -= 6 * b;
		sum += 51 * r;
		t -= 4 * r;
		sum += 4 * g;
		t -= g;
		sum -= c;
		t -= c;
		sum -= s * 3;
		t -= s * 2;
		sum -= 3 * t;
		cout << sum << endl;
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include <cstdio>

using namespace std;

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 coin = 100;

    coin -= (t - (s + (b * 5) + (r * 3))) * 3 + ((b * 5) + (r * 3)) * 2;
    coin += ((b + r) + (b * 5) + (r * 3)) * 15 + g * 7 + c * 2;
    printf("%d\n", coin);
  }

  return (0);
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
	
	while(true){
		int B,R,G,C,S,T;
		scanf("%d%d%d%d%d%d",&B,&R,&G,&C,&S,&T);
		if(T==0)break;
		T-=S;
		int ans=100;
		ans+=77*B;
		T-=6*B;
		ans+=51*R;
		T-=4*R;
		ans+=4*G;
		T-=G;
		ans-=C;
		T-=C;
		ans-=3*T;
		printf("%d\n",ans);
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<string>
using namespace std;
#define fr first
#define sc second
int main(){
  int a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f && (a+b+c+d+e+f)){
    int BT = 5 * a + 3 * b;
    int Csum = 15 * a + 15 * b + 7 * c + 2 * d + 15 * BT;
    int Crsum = 3 * ( f - e - BT) + 2 * BT;
    cout << 100 + Csum - Crsum << 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;
		cout<<100+b*(16*5+15)+r*(16*3+15)+g*7+c*2+s*3-t*3<<endl;
	}
}

C++: #define _USE_MATH_DEFINES
#define INF 10000000
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>

using namespace std;

typedef long long ll;
typedef pair <int,int> P;
typedef pair <P,P> PP;
typedef pair <int,PP> PPP;

static const double eps = 1e-8;

int main(){

	int b,r,g,c,s,t;
	while(~scanf("%d %d %d %d %d %d",&b,&r,&g,&c,&s,&t)){
		if(b==r && r==g && g==c && c==s && s==t && t==0) break;
		int big = -3 * b + 15 * b + (15 - 2) * b * 5;
		int bar = -3 * r + 15 * r + (15 - 2) * r * 3;
		int sum = 100 + big + bar -3 * g + 7 * g + (-3 * c + 2 * c) + (-3 * s)
			-3 * (t-(b+b*5)-(r+r*3)-g-c-(s*2));
		cout << sum << endl;
	}
}

C++: #include <bits/stdc++.h>
using namespace std;

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+ b*12 + b*13*5 + r*12 + r*13*3 + g*4 + c*(-1) + s*(-3) +(-3)*(t-(b+b*5+r+r*3+g+c+s+s)) << endl;
  }
  return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n)for(ll i=0;i<n;i++)
using namespace std;
typedef long long ll;

int main() {
	int b, r, g, c, s, t;
	while (cin >> b >> r >> g >> c >> s >> t, b | r | g | c | s | t) {
		cout << 100 + b * 5 * 13 + r * 3 * 13 + b * 15 + r * 15 + g * 4 + c*-1 - 3 * (t - b * 5 - r * 3 - g - c - s) << endl;
	}
}

C++: #include<iostream>
using namespace std;int main(){int d,r,g,c,s,t;while(true){cin>>d>>r>>g>>c>>s>>t;if(d+r+g+c+s+t==0)break;cout<<100+95*d+63*r+7*g+2*c+3*s-3*t<<endl;}return 0;}

C++: #include<iostream>

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

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