#include int jc(int n){ if(n = 1) return n else return jc(n-1)*n;}int main(){ int i = 1,num = 0,sum = 0; scanf("%d",&num); do{ sum += jc(i++); }while(i <= num); printf("%d\n",sum); return 0;}