#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 == 0 && r == 0 && g == 0 && c == 0 && s == 0 && t == 0){
      break;
    }
    t -= s;
    int tb = 5*b + 3*r;
    t -= tb;
    int u = tb*13;
    int m = t * 3;

    int v = 100 + u + 15*(b+r) + 7*g + 2*c - m;
    cout << v << endl;
  }

  return 0;
}