fun main(args:Array<String>?): Unit {

    val (a, b, c) = readLine()!!.trim().split(' ').map(String::toInt)
    val week = a * 7 + b
    println(
            c / week * 7 + java.lang.Math.min(((c % week + a - 1) / a), 7)
    )
}
