#include <stdio.h>
#include <stdlib.h>
int main() {
long sum;
long n;
int i;
FILE *fp;
sum = 0;
n = 1;
for (i = 1; i < 11; i++) {
n *= i;
sum += n;
}
fp = fopen("D:\\result.txt", "w+");
if(fp == NULL) exit(0);
fprintf(fp, "%ld\n", sum);
fclose(fp);
exit(0);
}