#include "stdio.h"
int main()
{
    int total = 0, mul;
    for (int i = 1; i <= 20; ++i){
        mul = 1;
        for (int j = 1; j <= i; ++j){
            mul *= j;
        }
        total += mul;
    }
    printf("total = %d\n", total);
    return 0;
}