program sample
    implicit none
  
    integer(8) :: i,j,m,n
    real(8)::a,b
    integer(8),allocatable :: x(:),y(:)
  
    read(*,*) n,i,j
    if (abs(n-i)>abs(n-j) )then
        write(*,*) j
    else
        write(*,*) i
    end if    
  
    stop
end program sample
  

