fun main(args: Array<String>) {
    val sc = java.util.Scanner(System.`in`)
    val p = sc.nextInt()
    val q = sc.nextInt()
    val r = sc.nextInt()

    val ans = solve(p, q, r)
    println(ans)
}

fun solve(p: Int, q:Int, r:Int): Int {
    return listOf(p+q, p+r, q+r).sorted()[0]
}