loop do
  medal = 100
  b,r,g,c,s,t = $stdin.gets.chomp.split(" ").map(&:to_i)
  break if b + r + g + c + s + t == 0
  medal += 95 * b
  medal += 63 * r
  medal += 7 * g
  medal += 2 * c
  medal -= (t - s) * 3
  p medal
end