inpt = map(int, raw_input().split()) lng = inpt[0] bite = inpt[1] x = lng / (bite * 2) if lng % (bite * 2) == 0: x -= 1 print x * bite