#!/usr/bin/python
#5!+4!+3!+2!+1!
#give 3 return 3*2*1
def jiechen(n):
N = map(lambda x:x+1,range(n))
f = reduce(lambda x,y:x*y,N)
return f
#give 5 return [1,2,3,4,5]
def create_range(num):
range_list = map(lambda x:x+1,range(num))
return range_list
def main():
given_num = int(raw_input('give me a int num'))
most_big_num_list = create_range(given_num)
sum = 0
for each_big_num in most_big_num_list:
sum = sum + jiechen(each_big_num)
print sum
if __name__ == '__main__':
main()