n=eval(input()) num=1 hebing=0 if n>0: for i in range(1,n+1): num=i*num hebing+=num print("%d"%(hebing))