#include <iostream>
#include <cstdio>
#include <algorithm>
#include <array>
#include <vector>
#include <cmath>

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;
	cout << 100 + b * 15 * 6 + 15 * r * 4 + g * 7 + c * 2 - 3 * ( t - s - b * 5 - r * 3 ) - 2 * ( b * 5 + r * 3 ) << endl;
  }  
}