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>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

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 + 15*(b*6+r*4)+7*g+2*c-3*(t-b*5-r*3-s)-2*(b*5+r*3) << "\n";
    }
    return 0;
}

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

int main(){
	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 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; }
		cout << (a + b + a * 5 + b * 3) * 15 + c * 7 + d * 2 - 3 * (f - e) << endl;
	}
}

C++: // 2011/01/08 Tazoe

#include <iostream>
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 med = 100;

		med += (15+(15-2)*5)*b;
		med += (15+(15-2)*3)*r;
		med += 7*g;
		med += 2*c;

		med -= 3*(t-5*b-3*r-s);

		cout << med << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <set>

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,j) FOR(i,0,j)
#define mp std::make_pair

typedef long long ll;
typedef unsigned long long ull;
typedef std::pair<int,int> P;
typedef std::pair<int,P> State;

const int INF = 1001001001;

// S N E W(南北東西)
const int dx[8] = {0, 0, 1, -1, 1, 1, -1, -1}, dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};

// 何も得られなかった: t-(grape+cherry+seven+bar+star+seven*5+bar*3), -3
// Grape/Cherry/Seven/Bar: grape+cherry+seven+bar, それぞれによる
// Star: star, 0
// Bonus game: seven*5+bar*3, +13

int main(){
    int seven, bar, grape, cherry, star, t;
    while(std::cin >> seven >> bar >> grape >> cherry >> star >> t, seven||bar||grape||cherry||star||t){
        int res = 100 - (t-(seven+bar+grape+cherry+star+seven*5+bar*3)) * 3
            + grape * 4 - cherry + seven * 12 + bar * 12 + (seven*5+bar*3) * 13;
        std::cout << res << std::endl;
    }
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
#define ALL(c)   (c).begin(),(c).end()

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 ge=100,lo=0;
    lo=3*t;
    lo-=s*3;
    lo-=b*5;
    lo-=r*3;
    

    ge+=b*5*15;
    ge+=r*3*15;
    ge+=c*2;
    ge+=g*7;
    ge+=r*15;
    ge+=b*15;
    cout << ge-lo << endl;
    //cout << ge <<" " << lo << endl;
  }
  return false;
}

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 (t == 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 <cstdio>

using namespace std;

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

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <functional>
#include <cmath>
#include <complex>
#include <cctype>
#include <cassert>
#include <sstream>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <deque>

using namespace std;

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

template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, pii> pip;

const ll INF = 1ll<<29;
const ll MOD = 1000000007;
const double EPS = 1e-10;

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 += b * 15 + 15 * 5 * b;
		ans += r * 15 + 15 * 3 * r;
		ans += g * 7;
		ans += c * 2;
		
		t -= s;
		ans -= (5 * b + 3 * r) * 2;
		ans -= (t - 5 * b - 3 * r) * 3;
		
		cout << ans << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
  int a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f,a||b||c||d||e||f){
    int sum=100;
    sum+=a*15+b*15+c*7+d*2;
    int kai=f-e;
    sum-=3*kai;
    int bau=5*a+3*b;
    sum+=bau*16;
    cout<<sum<<endl;
  }
}

C++: #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)

#define PB push_back
#define INF INT_MAX/3
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define CLR(a) memset(a,0,sizeof(a))

typedef long long int ll;

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

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)n;i++)
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 sum = 100;

    rep(i,b){
      sum -= 3;
      sum += 15;
      t--;
      rep(j,5){
	sum -= 2;
	sum += 15;
	t--;
      }
    }
    rep(i,r){
      sum -= 3;
      sum += 15;
       t--;
      rep(j,3){
	sum -= 2;
	sum += 15;
	t--;
      }
    }
    
    rep(i,g){
      sum -= 3;
      sum += 7;
      t--;
    }

    rep(i,c){
      sum -= 3;
      sum +=2;
      t--;
    }

    t -= s;

    sum -= t*3 ;

    if(sum < 0)sum = 0;
    cout << sum << endl;

  }


  return 0;
}