a, b = map(int, input().split()) k = a // b l = a % b if l == 0: print(b * (k / 2-1)) else: print(b * k /2)