pockey_length, bite_length = gets.split.map(&:to_i) bite_times = pockey_length % (bite_length * 2) != 0 ? pockey_length / (bite_length * 2) : pockey_length / (bite_length * 2) - 1 puts bite_length * bite_times