import java.lang.Math.*

fun main(args:Array<String>):Unit {
    while (true){
        val arg = readLine()!!.trim().split(' ').map(String::toInt)
        if (arg.all{it == 0}) return
        val (b, r, g) = arg.take(3)
        val (c, s, t) = arg.takeLast(3)
        println(100 + b * 15 + b * 5 * 16 + r * 15 + r * 3 * 16 + g * 7 + c * 2 + s * 3 - 3 * t)
    }
}

