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 <algorithm>
#include <functional>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <climits>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
using namespace std;
typedef pair<int ,int > P;
typedef long long ll;

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

void solve() {
    int ans = 100;
    t-=s;
    ans += c*2;
    ans += g*7;
    ans -= t*3;
    ans += r*3*16;
    ans += b*5*16;
    ans += r*15;
    ans += b*15;
    cout<<ans<<endl;

}

int main() {
    while(cin>>b>>r>>g>>c>>s>>t) {
        if(b+r+g+c+s+t==0) break;
        solve();
    }
    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&&b+r+g+c+s!=0)cout<<100+b*80+r*54+7*g+c*2-(t-s-(b*5)-(r*3))*3<<endl;}

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

using namespace std;

int main()
{
	int medal = 100;
	int p[5];
	int t;

	while (1){
		int pro, loss;

		for (int i = 0; i < 5; i++){
			scanf("%d", &p[i]);
		}
		scanf("%d", &t);

		if (p[0] == 0 && p[1] == 0 && p[2] == 0 && p[3] == 0 && p[4] == 0 && t == 0){
			break;
		}

		medal -= 3 * (t - (p[0] * 6 + p[1] * 4 + p[2] + p[3] + p[4]));
		medal += p[0] * 77 + p[1] * 51 + p[2] * 4 + p[3] * -1;

		cout << medal << endl;
	}

	return (0);
}

C++: #include <bits/stdc++.h>
using namespace std;
  
// #define int long long
#define pb push_back
  
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
 
template <class X> void print(X Target){ cout << Target << '\n'; }

signed main()
{
  ios::sync_with_stdio(false);
  int b, r, g, c, s, t;

  while (cin >> b >> r >> g >> c >> s >> t, b || r || g || c || s || t){
    int ans = b * 15 + r * 15 + b * 13 * 5 + r * 13 * 3 + g * 7 + c * 2 + 100;
    print(ans - (t - b * 5 - r * 3 - s) * 3);
  }

  return (0);
}

C++: #include <iostream>
#include <bitset>
#include <algorithm>
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 total = t - s - r * 3 - b * 5;
		cout << 100 + (b + r) * 15 + b * 5 * 13 + r * 3 * 13 + g * 7 + c * 2 - total * 3 << endl;
	}
	return 0;
}

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

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

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

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
	int b,r,g,c,s,t;

	while(cin>>b>>r>>g>>c>>s>>t){
	    int f=100;
        if(b==0&&r==0&&c==0&&s==0&&g==0&&t==0)break;
        f+=b*5*15;
        f+=r*3*15;
        f+=g*7;
        f+=c*2;
        f+=s*3;
        f-=(t-(b*5)-(r*3))*3;
        f-=b*2*5;
        f-=r*2*3;
        f+=b*15;
        f+=r*15;

        cout<<f<<endl;
	}


	return 0;
}

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

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007
#define EPS 1e-10

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;
typedef pair<P, char> PC;

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

int main(){
	while (cin >> b >> r >> g >> c >> s >> t&&b + r + g + c + s + t){
		cout << 100 - (t - s) * 3 + (b + r) * 15 
			+ g * 7 + c * 2 + (b * 5 + r * 3) * 16 << 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 <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <sstream>
#include <cmath>
#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 ans = 100;
		
		ans += b * (15 + 16 * 5);
		ans += r * (15 + 16 * 3);
		ans += g * 7;
		ans += c * 2;
		
		t -= s;
		
		ans -= t * 3;
		
		cout << ans << endl;
		
	}
	
	return 0;
}

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

C++: 
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
#include<limits>
#include<iterator>

#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define rep(i,n) for(int i=0; i<n; i++)
#define INF (1<<20)

using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ll, char> plc;

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;

		ll ans = 100;
		ans += b * 15 + r * 15 + (b * 5 + r * 3) * 15 + g*7 + c*2;
		ans -= 2 * (b * 5 + r * 3);
		ans -= 3 * (t-(b*5+r*3)-s);

		cout << ans << endl;
	}
	return 0;
}

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

int main() {
	// your code goes here
	int b,r,g,c,s,t;
	while(cin >> b >> r >> g >> c >> s >>t && t!=0){
		int sum=0;
		sum+=15*(b+r)+16*(b*5+r*3)+g*7+c*2+s*3-t*3+100;
		cout << sum << endl;
	}
	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){
    if(b == 0 && r == 0 && g == 0 && c == 0 && s == 0 && t ==0) break;
    int money =100;
    money += 77 * b;
    t -= 6 * b;
    money += 51 * r;
    t -= 4 * r;
    money += 4 * g;
    t -= g;
    money -= c;
    t -= c;
    t -= s;
    money -= 3* t;

    cout << money << endl;
  }
  
}