#include<vector>
#include<list>
#include<algorithm>
#include<iostream>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
using namespace std;
int main(){
  int b,r,g,c,s,t;
  while(cin>>b>>r>>g>>c>>s>>t&&b+r+g+c+s+t)
    cout<<100+b*80+r*54+g*7+c*2+s*3-(t-b*5-r*3)*3<<endl;
  return 0;
}