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 && b == 0 && c == 0 && d == 0 && e == 0 && f == 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>
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;
    }
}

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

using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vvb;
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 loop(i,a,b) for(ull i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)
#define iter(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i)
#define riter(i,c) for(auto i=(c).rbegin(); i!=(c).rend(); ++i)
const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;
namespace std {
    template<typename T>ostream&operator<<(ostream&os, vector<T>const&v){
        iter(it,v) os<<*it<<(it+1==v.end()?"":",");
        return os;
    }
    template<typename T, typename U>ostream&operator<<(ostream&os,const pair<T,U>&p){
        return os << "[" << p.dirst << "," << p.second << "]";
    }
}

void visit(const vvi &g, int v, vvi& scc,
           stack<int> &S, vector<bool> &inS,
           vector<int> &low, vector<int> &num, int& time) {
    low[v] = num[v] = ++time;
    S.push(v); inS[v] = true;
    iter(e, g[v]) {
        int w = *e;
        if (num[w] == 0) {
            visit(g, w, scc, S, inS, low, num, time);
            low[v] = min(low[v], low[w]);
        } else if (inS[w])
            low[v] = min(low[v], num[w]);
    }
    if (low[v] == num[v]){
        scc.push_back(vi());
        while (1) {
            int w = S.top(); S.pop(); inS[w] = false;
            scc.back().push_back(w);
            if (v == w) break;
        }
    }
}
 
void scc(vvi const& g, vvi& res) {
    int const n = g.size();
    vi num(n), low(n);
    stack<int> S;
    vector<bool> inS(n);
    int time = 0;
    rep(u,n)if(num[u]==0) visit(g, u, res, S, inS, low, num, time);
}
 
bool f(string const& a, string const& b){
    if(a.size()!=b.size()) return false;
    bool res=true;
    rep(i,a.size()){
        if(a[i]=='*') continue;
        if(a[i]!=b[i]){
            res=false;
            break;
        }
    }
    return res;
}

int main(){
    int b,r,g,c,s,t;
    while(cin >> b>>r>>g>>c>>s>>t && max({b,r,g,s,t})){
        int win = 100;
        win += 
            + b * (15 + 5*15 + 5)
            + r * (15 + 3*15 + 3)
            + g * 7 + c*2;

        int p=t-s;
        int lose = p*3;
        cout<<win-lose<<endl;
    }
     
    return 0;
}

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

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

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

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

		cout << ans << endl;
	}
}

C++: #include <iostream>

using namespace std;

int main()
{
	for(int b,r,g,c,s,t;cin>>b>>r>>g>>c>>s>>t,b|r|g|c|s|t;){
		int get=100+b*15+r*15+g*7+c*2;
		get+=(b*5+r*3)*15;
		int pay=(t-s)*3-(b*5+r*3);
		cout<<get-pay<<endl;
	}
	
	return 0;
}

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)&&t) {
		printf("%d\n", b*95 + r*63 + g*7 + c*2 + s*3 - t*3 + 100);
	}
	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 <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){

	int b,r,g,c,s,t;
	while(cin>>b>>r>>g>>c>>s>>t&&!(b==0&&r==0&&g==0&&c==0&&s==0&&t==0)){
		int left=t-b-r-g-c-s-b*5-r*3;
		int medal=100-left*3;
		medal+=b*12;
		medal+=(5*b)*13;
		medal+=r*12;
		medal+=(3*r)*13;

		medal+=g*4;
		medal+=c*(-1);

		cout<<medal<<endl;
	}


	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <complex>
#include <map>
#include <climits>
#include <sstream>
using namespace std;

#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second
#define mkp make_pair

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vint;
static const int INF=1<<24;

template <class T>
void initvv(vector<vector<T> > &v,int a,int b, const T  &t = T()){
	v.assign(a,vector<T>(b,t));
}

//v.erase(unique(v.begin(),v.end()),v.end());


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*(15*6-10)+r*(15*4-6)+g*7+c*2-3*(t-b*5-r*3-s)+100<<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;
    }
    t -= s;
    int tb = 5*b + 3*r;
    t -= tb;
    int u = tb*13;
    int m = t * 3;

    int v = 100 + u + 15*(b+r) + 7*g + 2*c - m;
    cout << v << endl;
  }

  return 0;
}

C++: #include <cstdio>

int main(){
	int b,r,g,c,s,t,score;
	while(scanf("%d%d%d%d%d%d",&b,&r,&g,&c,&s,&t),b|r|g|c|s|t != 0){
		score = 100;
		score += b*(15+13*5);
		score += r*(15+13*3);
		score += g*7;
		score += c*2;
		score += s*3;
		score -= (t-b*5-r*3)*3;
		printf("%d\n",score);
	}

	return 0;
}

C++: #include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>

using namespace std;

#define reps(i,f,n) for(int i=f; i<int(n); ++i)
#define rep(i,n) reps(i,0,n)

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;

const int INF = 1001001001;

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