### main

while true
  b, r, g, c, s, t = gets.strip.split(' ').map{|s| s.to_i}
  break if b == 0 && r == 0 && g == 0 && c == 0 && s == 0 && t == 0

  bg = b * 5 + r * 3

  rev  = b * 15 + r * 15 + bg * 15 + g * 7 + c * 2
  exp = bg * 2 + (t - bg - s) * 3

  medal = 100 + rev - exp

  puts medal
end