import math def main(): A, B = map(int, input().split()) a, b = A, B d = math.gcd(abs(a), abs(b)) result = 0.0 threshold = 1e-20 # Threshold to stop iteration when terms become negligible max_k = 1000 # Upper limit to prevent infinite loops in case of unexpected scenarios for k in range(0, max_k + 1): S = 2 + d * k term = (k + 1) / (S ** S) if term < threshold: break result += term # Formatting the output to have enough decimal places print("{0:.30f}".format(result).rstrip('0').rstrip('.') if '.' in "{0:.30f}".format(result) else "{0:.30f}".format(result)) if __name__ == "__main__": main()