program main
	implicit none
    integer :: p, q, r, a(3), minimum
    read(*, *) p, q, r
    a(1) = p + q
    a(2) = q + r
    a(3) = r + p
    minimum = minval(a)
    write(*, *) minimum
stop
end program main