n, m = gets.split.map(&:to_i) if n == m puts 1 exit end if n == 3 && m < 3 puts -1 exit end puts (n / m.to_f).ceil