import math def compute_zeta_minus_1(K): if K == 1: return 0.5 s = 0.0 n = 2 while True: term = 1.0 / (n ** K) if term < 1e-15: # Term is negligible for the required precision break s += term n += 1 return s X, K = map(int, input().split()) if X == 1: result = (0.75) ** K print("{0:.10f}".format(result)) elif X == 2: if K == 1: print("0.5000000000") else: res = compute_zeta_minus_1(K) print("{0:.10f}".format(res))