#include <iostream>

using namespace std;

int main() {
  for (;;) {
    int b, r, g, c, s, t;
    cin >> b >> r >> g >> c >> s >> t;
    if (!b && !r && !g && !c && !s && !t) return 0;
    cout << 100+b*15+r*15+g*7+c*2+(b*5+r*3)*(15-2)-(t-b*5-r*3-s)*3 << endl;
  }
}