#include<stdio.h> int main() { int a,i,j; float sum; a=1;j=2;sum=0; for (i=0;i<=30;i++) { while(j<=i) { a=a*j; j=j+1; } sum=sum+a; } printf("%.3g\n",sum); }