#include<stdio.h> int main() { int a,b=0,c=1; scanf("%d",&a); for(int i=1;i<=a;i++){ for(int j=i;j>=1;j--) c*=j; b+=c; } printf("%d",b); return 0; }