import java.util.*

object MainKt {
	@JvmStatic
	fun main(args: Array<String>) {
		val scanner = Scanner(System.`in`)
		val p = scanner.nextInt()
		val q = scanner.nextInt()
		val r = scanner.nextInt()
		if (Math.max(p, q)<r) println(p+q)
		else println(Math.min(p,q)+r)
	}
}