Time limit 4000/7000/7000/7000 ms. Memory limit 65000/65000/65000/65000 Kb. Question by Arban Uka.
nth Pentagonal Number
Shqip
In mathematics, pentagonal numbers is calculated with the following formula:
Thus, the first 10 pentagonal numbers: 1, 5, 12, 22, 35, 51, 70, 92, 117, 145.
Write a program that is going to calculate and show nth pentagonal number.
Input specification
There will be just one number (n) where 1 ≤ n ≤ 35000.
Output specification
Show nth pentagonal number.
Sample Input I:
5
|
Sample Input II:
34004
|
Sample Output I:
35
|
Sample Output II:
1734391022
|
Для отправки решений необходимо выполнить вход.
|