5903 - GESP:2025-9月等级1-T2-金字塔
Time Limit : 1 秒
Memory Limit : 128 MB
金字塔由 n 层石块垒成。从塔底向上,每层依次需要 n×n,(n−1)×(n−1),…,2×2,1×1 块石块。请问搭建金字塔总共需要多少块石块?
Input
一行,一个正整数 n,表示金字塔的层数
Output
一行,一个正整数,表示搭建金字塔所需的石块数量。
Examples
Input
2
Output
5
Input
5
Output
55
Hint
对于所有测试点,保证 1≤n≤50。