l, k = gets.split(' ').map(&:to_i) w = l / k ans = 0 ans = (w / 2) * k if w != 2 puts ans