x = float(input()) a = float(input()) if x < -5: y = a * (x) * -1 * 2 print(round(y, 3)) elif -5 < x < 1: modulex = abs(x) y = a * modulex print(round(y, 3)) elif x >= 1 and (a - x != 0): y = 1 / (a - x) print(round(y, 3)) else: print("На ноль делить нельзя")