#include <iostream>
#include <string>
#include <vector>
#include <cstring>
#include <climits>
#include <algorithm>
#include <map>
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 = 100;

        res -= b * 3;
        res += b * 15;
        res += b * 5 * 13;
        t -= b * 6;

        res -= r * 3;
        res += r * 15;
        res += r * 3 * 13;
        t -= r * 4;

        res -= g * 3;
        res += g * 7;
        t -= g;

        res -= c * 3;
        res += c * 2;
        t -= c;

        res -= s * 3;
        t -= s * 2;

        res -= t * 3;

        cout << res << endl;
    }
    return 0;
}