import Foundation
 
let input_line = readLine()!
 
let split = input_line.componentsSeparatedByString(" ") //components(separatedBy:)と実質同じ
let P = Int(split[0])!
let Q = Int(split[1])!
let R = Int(split[2])!
 
let value1 = P + Q
let value2 = P + R
let value3 = Q + R

if value1 <= value2 && value1 <= value3 {
    print(value1)
} else if value2 <= value3 {
    print(value2)
} else {
    print(value3)
}