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<iostream>
using namespace std;
int main(){
  int b,r,g,c,s,t;
  int brg;//チャンスゲーム数
  int ct;//コインの使った数
  int cs;//コインを手にいれた数
  while(cin>>b>>r>>g>>c>>s>>t){
    if(b==0&&r==0&&g==0&&c==0&&s==0&&t==0) break;
    brg = b*5+r*3;
    ct = brg*2+(t-brg-s)*3;
    cs = b*15+r*15+c*2+brg*15+g*7;
    cout << 100+cs-ct << endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int b, r, g, c, s, t;
  while (cin >> b >> r >> g >> c >> s >> t, t) {
    int ans = 100;
    ans += 15 * b + 15 * r + 7 * g + 2 * c;
    ans += 5 * 15 * b + 3 * 15 * r;
    ans -= (t - 5 * b - 3 * r - s) * 3;
    ans -= (5 * 2 * b + 3 * 2 * r);
    cout << ans << endl;
  }

  return 0;
}

C++: #include <iostream>
#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
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 lost=0, gain=0;
		lost += (t-s-5*b-3*r)*3;
		gain += 15*(b+r)+(5*b+3*r)*13+g*7+c*2;
		cout << 100-lost+gain << 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){
    long res = 100;
    res += b * 15 + r * 15 + g * 7 + c * 2 + s * 3;
    res += (b * 5 + r * 3) * 16;
    res -= t * 3;
    cout << res << endl;
  }
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<numeric>
#include<cassert>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define rep(i,s,n) for(int i=(s); i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define IN(x,s,g) ((x) >= (s) && (x) < (g))
#define ISIN(x,y,w,h) (IN((x),0,(w)) && IN((y),0,(h)))
#define print(x) printf("%d\n",x)

using namespace std;

typedef unsigned int uint;
typedef long long ll;

const int _dx[] = {0,1,0,-1};
const int _dy[] = {-1,0,1,0};

int getInt(){
  int ret = 0,c;
  c = getchar();
  while(!isdigit(c)) c = getchar();
  while(isdigit(c)){
    ret *= 10;
    ret += c - '0';
    c = getchar();
  }
  return ret;
}

int main(){
  while(true){
    int b = getInt();
    int r = getInt();
    int g = getInt();
    int c = getInt();
    int s = getInt();
    int t = getInt();

    if(b+r+g+c+s+t == 0) break;

    int ans =
      100 + b * 15 + r * 15 + g * 7 + c * 2 + s * 3 - t * 3 + b * 5 + r * 3
      + b * 15 * 5 + r * 15 * 3;
    print(ans);
  }
  return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int main(void){
	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 ret=100;
		int bg = b*5+r*3;
		int ng = t - bg - s;

		ret += b * 6 * 15 + r * 4 * 15 + g * 7 + c * 2;
		ret -= 3*ng + 2*bg;
		
		cout << ret << 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==0 && r==0)
			break;
		int medal = 100;
		int bonus = 0;
		bonus += b*5;
		medal += b*15;
		bonus += r*3;
		medal += r*15;
		medal += g*7;
		medal += c*2;
		t -= s;
		t -= bonus;
		medal += bonus*13;
		medal -= 3*t;
		cout << medal << endl;
	}
	return 0;
}

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

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


int main(){
	while(true){
		int b,r,g,c,s,t;
		cin>>b>>r>>g>>c>>s>>t;
		if(t==0) break;
		int game_count=t;
		game_count-=5*b+3*r+s;
		int medal_count=15*b+15*r+7*g+2*c+100-game_count*3;
		int bonus_count=b*5+r*3;
		medal_count+=bonus_count*13;
		printf("%d\n", medal_count);
	}
	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+t ) {
    int ans = 100;
    ans -= t * 3;
    ans += b * (15 * 6 + 5);
    ans += r * (15 * 4 + 3);
    ans += g * 7;
    ans += c * 2;
    ans += s * 3;
    cout << ans << endl;
  }
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#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>
#include <numeric>

using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype

template <class T>
int __builtin_popcount(T n) { return n ? 1 + __builtin_popcount(n & (n - 1)) : 0; }
#endif

#define foreach(it, c) for (__typeof__((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define popcount __builtin_popcount

const double EPS = 1e-10;
typedef long long ll;
typedef pair<int, int> pint;


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)
		printf("%d\n", 100 - 3*(t-s-5*b-3*r)
			+ 13*(5*b+3*r) + 15*(b+r) + 7*g + 2*c);

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

		cout << point << endl;
	}
	return 0;
}

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

int main(){
	int a,b,c,d,e,f;
	while(1){
		cin >> a >> b >> c >> d >> e >> f;
		if(a == 0 && b == 0 && c == 0 && d == 0 && e == 0 && f == 0) break;
		int now = 100;
		int t = f;
		t -= a*5 + b*3 + e;
		now -= t * 3;
		now += a*15 + b*15 + a*15*5 + b*15*3 + c*7 + d*2;
		now -= a*5*2 + b*3*2;
		cout << now << endl;
	}
}

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

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