import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val p = sc.nextInt
  val q = sc.nextInt
  val r = sc.nextInt


  val res = Seq(p + q, q + r, r + p).min
  println(res)

}