from math import * k = int(input("k=")) x = int(input("x=")) s=0 for n in range(1,k): s+=(pow(-1,n+1)*pow(x,2*n-1))/factorial(2*n-1) print(s)