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 <cstdio>
#include <cstring>
#include <algorithm>
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 m = 100;
    m -= t * 3;
    m += s * 3;
    m += c * 2;
    m += b * 15;
    m += (b*5) * 15 + (b*5);
    m += r * 15;
    m += (r*3) * 15 + (r*3);
    m += g * 7;

    cout << m << endl;
  }
  return 0;
}

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+r+g+c+s+t == 0)    break;
    
        int medal = 100;
        medal += 80*b;
        medal += 54*r;
        medal += 7*g;
        medal += 2*c;
        medal -= (t-s-5*b-3*r)*3;
        cout << medal << endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

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

C++: #include<iostream>

using namespace std;

int main()
{
	int ans,b,r,g,c,s,t,i,j;
	
	for(;;)
	{
		cin >> b >> r >> g >> c >> s >> t;
		if(t==0)
			break;
		
		ans=100;
		
		ans+=(b*6+r*4)*15+g*7+c*2+s*3;
		ans-=t*3-b*5-r*3;
		
		
		cout << ans << endl;
	}
}

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


int main(){

  int b , r , g , c , s , t , medal = 100;

  while(1){

    cin >> b >> r >> g >> c >> s >> t;
    if( b == 0 && r == 0 && g == 0 && c == 0 && s == 0 && t == 0 ) break;

    medal += 65 * b + 15 * b;
    medal += 39 * r + 15 * r;
    medal += 4 * g;
    medal -= 1 * c;
    medal -= ( t - s - (b * 5) - (r * 3) - g - c ) * 3;

    cout << medal << endl;
    medal = 100;
  }


  return 0;
}

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

#define REP(i,n) for(int i=0; i<n; i++)
#define RPA(i,s,e) for(int i=s; i<=e; i++)
#define RPD(i,s,e) for(int i=s; i>=e; i--)
#define PB(a) push_back(a)
#define MP(i,s) make_pair(i,s)
#define SZ(a) (int)(a).size()
#define ALL(a) (a).begin(), (a).end()
#define PRT(a) cout << (a) << endl
#define PRT2(a,b) cout << (a) << " " << (b) << endl
#define PRT3(a,b,c) cout << (a) << " " << (b) << " " << (c) << endl

typedef vector<int> VI;
typedef long long LL;
typedef pair<int,int> P;

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

void coding() {
	while(cin>>b>>r>>g>>c>>s>>t) {
		if(!(b|r|g|c|s|t)) break;
		int bon = 5 * b + 3 * r;
		int reg = t - s - bon;
		int ans = 100 - 3 * reg - 2 * bon;
		ans += 2 * c + 7 * g + 15 * bon + 15 * (b + r);
		cout << ans << endl;
	}
}

// #define _LOCAL_TEST

int main() {
#ifdef _LOCAL_TEST
	clock_t startTime = clock();
	freopen("a.in", "r", stdin);
#endif

	coding();

#ifdef _LOCAL_TEST
	clock_t elapsedTime = clock() - startTime;
	cout << endl;
	cout << (elapsedTime / 1000.0) << " sec elapsed." << endl;
	cout << "This is local test" << endl;
	cout << "Do not forget to comment out _LOCAL_TEST" << endl << endl;
#endif
}

C++: #include<stdio.h>

int main(){

int b,r,g,c,s,t,S=0;
while(1){

scanf("%d %d %d %d %d %d",&b,&r,&g,&c,&s,&t);
if(b==r==g==c==s==t)break;
S=100;


//g=g-b*5-r*3;
S+=g*7+c*2+b*15+r*15;
S+=b*5*16+r*3*16;
t=t-s;
S-=t*3;

printf("%d\n",S);
}
return 0;
}

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

int main() {
  int data[6];
  bool flag;
  int sum;
  while(1) {
    flag = true;
    for(int i = 0; i < 6; i++) {
      cin >> data[i];
      if(data[i] != 0) flag = false;
    }
    if(flag) break;

    sum = 100;
    sum += data[0]*(5*15+15);
    sum += data[1]*(3*15+15);
    sum += data[2]*7;
    sum += data[3]*2;
    sum -= (data[5]-data[4]-data[0]*5-data[1]*3) * 3;
    sum -= (data[0]*5+data[1]*3) * 2;

    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, b || r || g || c || s || t) {
		int bg = b * 5 + r * 3;
		t -= bg + s;
		int m = 100 - t * 3 + bg * 13 + b * 15 + r * 15 + g * 7 + c * 2;
		cout << m << 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, b+r+g+c+s+t) {
		int res = 0;
		res += 15*b + 15*(5*b) + 5*b;
		res += 15*r + 15*(3*r) + 3*r;
		res += 7*g;
		res += 2*c;
		res -= 3*(t-s);
		cout << res + 100 << endl;
	}
}

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

int main(int argc, char *argv[]){
  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 medal = 100, bg = 0;
    bg = 5*b + 3*r;//テ」ツδ愿」ツδシテ」ツδ甘」ツつケテ」ツつイテ」ツδシテ」ツδ?・ツ崢榲ヲツ閉ー
    t -= (bg + s);//テゥツ?堙・ツクツクテ」ツつイテ」ツδシテ」ツδ?・ツ崢榲ヲツ閉ー
    medal += g*7;//テ」ツ?カテ」ツ?ゥテ」ツ??ヲツ渉ε」ツ?」テ」ツ?淌・ツ崢榲ヲツ閉ー
    medal += 3*13*r;//テ」ツδャテ」ツつョテ」ツδ・テ」ツδゥテ」ツδシテ」ツδ愿」ツδシテ」ツδ甘」ツつケテ・ツ崢榲ヲツ閉ー
    medal += c*2;//テ」ツδ?」ツつァテ」ツδェテ」ツδシテヲツ渉ε」ツ?」テ」ツ?淌・ツ崢榲ヲツ閉ー
    medal += 15*(b + r);
    medal += 5*13*b;//テ」ツδ禿」ツδε」ツつーテ」ツδ愿」ツδシテ」ツδ甘」ツつケテ・ツ崢榲ヲツ閉ー
    medal -= t*3;//テ」ツδ。テ」ツδ?」ツδォテヲツカツ暗ィツイツサ
    std::cout << medal << std::endl;
  }
  return 0;
}

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

int main(){
	int a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		if(a==0&&b==0&&c==0&&d==0&&e==0&&f==0)break;
		
		int sum=100;
		int im=(3*f)-(3*e)-(a*5)-(b*3);
		sum-=im;
		sum+=a*15;
		sum+=a*75;
		sum+=b*15;
		sum+=b*45;
		sum+=c*7;
		sum+=d*2;		
		cout<<sum<<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&&!(b==0&&r==0&&g==0&&c==0&&s==0&&t==0)){
    cout<<100+g*7+c*2+r*63+b*95-(t-s)*3<<endl;
  }
  return 0;
}

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

using namespace std;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vbb;
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(int i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)

const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

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

        ans += b*15;
        bonus += b*5;
        ans += r*15;
        bonus += r*3;
        ans += g*7 + c*2;

        ans += bonus*15;
        ans -= (t-s)*3;
        ans += bonus;

        cout << ans << endl;
    }
}

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

int main() {
	int B, R, G, C, S, T;
	for(;cin >> B >> R >> G >> C >> S >> T, B || R || G || C || S || T;) {
		int coin = 100;
		
		coin += 2 * C;
		coin += 7 * G;
		coin += 15 * R;
		coin += 15 * B;

		coin += 3 * R * (15 - 2);
		coin += 5 * B * (15 - 2);

		T -= S;
		T -= 5 * B + 3 * R;

		coin -= 3 * T;

		cout << coin << endl;
	}
	return 0;
}