#T235. 阶乘和

阶乘和

Description

Using high-precision arithmetic, compute S=1!+2!+3!++n!S=1!+2!+3!+…+n! where n50n≤50. Here, "!!" denotes the factorial operation, for example: 5!=5×4×3×2×15!=5×4×3×2×1. Given a positive integer nn as input, output the computed result SS.

Input Format

A single positive integer nn.

Output Format

The computed result SS.

5

153