program tax
  implicit none
  integer(8) :: a, b
  integer(8) :: x, i
  read(*,*) a, b

  x = 10 * b
  if (x*0.08 >= a+1) then
     write(*,*) -1
     stop
  end if
  
  do i = x, x + 9
     if (i*0.08 >= a) then
        write(*,*) i
        stop
     end if
  end do
  write(*,*) -1
  stop
end program tax
