#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 bonusGame = 5 * b + 3 * r,
            normalGame = t - bonusGame,
            medal = 100 + 13 * bonusGame + 15 * (b + r) + 7 * g + 2 * c - 3 * (normalGame - s);
        cout << medal << endl;
    }
}