# Programmer: Sriram Pemmaraju
# Date: Feb 13, 2015

x = float(input("Input a real number: "))
t = int(input("Input a nonnegative integer: "))

series = 1
numerator = 1
denominator = 1
counter = 1

# Each execution of this while-loop builds the next term by
# constructing a numerator and a denominator and then adding 
# numerator/denominator as the next term to the series
while counter <= t:
    numerator = numerator * x 
    denominator = denominator * counter
    series = series + numerator/denominator
    counter = counter + 1

print(series)
