# Program to find sum of series 1^1/1!+2^2/2!+3^3/3!...+n^n/n! 
 
import math
print("Enter the range of number:")
n=int(input())
sum=0.0
fact=1
for i in range(1,n+1):
    fact*=i
    sum += pow(i, i) / fact
print("The sum of the series = ",sum)