! 2019.10.19
!
      program answer
      implicit none
      integer :: A
      integer :: B
      integer :: ans
!
      read(*,*) A,B
!
      ans = A - 2*B
      if(ans .lt. 0) then
        ans = 0
      end if
      write(*,*) ans
      end program answer
