#include<iostream>
using namespace std;

int main(){
  int b,r,g,c,s,t;

  while(cin >> b >> r >> g >> c >> s >> t){
    int m = 100; // Ã£ÂÂ¡Ã£ÂÂÃ£ÂÂ«
    if(t == 0) return 0;
    m += -3*b + 15*b + 5*b*13;
    t -= b + 5*b;
    m += -3*r + 15*r + 3*r*13;
    t -= r + 3*r;
    m += -3*g + 7*g;
    t -= g;
    m += -c;
    t -= c;
    m += -3*s;
    t -= 2*s;
   m += -3*t;
	
    cout << m << endl;
  }

}