import scala.io.StdIn

object Main extends App {
  val inputs = StdIn.readLine().split(" ")
  val P = inputs(0).toInt
  val Q = inputs(1).toInt
  val R = inputs(2).toInt

  val C = Seq((P,Q), (P, R), (Q, R))
  val min = C.map{case (_1, _2) => _1 + _2}.min

  println(min)
}