object Main {
  import Array._
  import scala.io.StdIn.readLine

  def main(args: Array[String]): Unit = {
    val Array(p, q, r) = readLine split(" ") map(_.toInt)
    println(Array(p + q, q + r, r + p).min)
  }
}
