program main
 implicit none
 integer*8 p,q,r
 read(*,*) p,q,r
 if (p>=q .and. p>=r) then
  write(*,*) q+r
 else if(q>=p .and. q>=r) then
  write(*,*) p+r
 else
  write(*,*) p+q
 end if
end program main