CF1180A.Alex and a Rhombus
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
While playing with geometric figures Alex has accidentally invented a concept of a n -th order rhombus in a cell grid.
A 1 -st order rhombus is just a square 1×1 (i.e just a cell).
A n -th order rhombus for all n≥2 one obtains from a n−1 -th order rhombus adding all cells which have a common side with it to it (look at the picture to understand it better).
Alex asks you to compute the number of cells in a n -th order rhombus.
输入格式
The first and only input line contains integer n ( 1≤n≤100 ) — order of a rhombus whose numbers of cells should be computed.
输出格式
Print exactly one integer — the number of cells in a n -th order rhombus.
输入输出样例
输入#1
1
输出#1
1
输入#2
2
输出#2
5
输入#3
3
输出#3
13
说明/提示
Images of rhombus corresponding to the examples are given in the statement.