#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    for(;;){
        int b, r, g, c, s, t;
        cin >> b >> r >> g >> c >> s >> t;
        if(b+r+g+c+s+t == 0)
            return 0;

        int ret = 100;
        ret -= (b * 5 + r * 3) * 2;
        ret -= (t - (b * 5 + r * 3) - s) * 3;
        ret += (b + r) * 15;
        ret += (b * 5 + r * 3) * 15;
        ret += g * 7;
        ret += c * 2;
        cout << ret << endl;
    }
}