#include <iostream>

using namespace std;

int main(){
  int b,r,g,c,s,t;
  while(cin >> b >> r >> g >> c >> s >> t){
    if(b == 0 && r == 0 && g == 0 && c == 0 && s == 0 && t ==0) break;
    int money =100;
    money += 77 * b;
    t -= 6 * b;
    money += 51 * r;
    t -= 4 * r;
    money += 4 * g;
    t -= g;
    money -= c;
    t -= c;
    t -= s;
    money -= 3* t;

    cout << money << endl;
  }
  
}