Under construction

Still being built. Things may change

Hive

Time limit2sMemory limit1024 MB

Summary
Given the size n of a hexagonal hive built from rings around one center cell, print the total number of cells.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Statement

Kevin works as a builder. Since Kevin is a bee, he builds only beehives.

A beehive is made of identical cells, each one a regular hexagon. Among bees, a hive of size one is a hive made of a single cell. A hive of size two is a hive of size one surrounded by one ring of cells. In general, a hive of size kk is a hive of size k−1k-1 surrounded by a ring of cells.

Recently Kevin was asked to build a hive of size nn. To plan the work, he needs the exact number of cells in the hive. Write a program that takes the size nn and prints the number of cells in that hive.

Input

The input file contains a single integer nn (1≤n≤1091 \le n \le 10^9), the size of the hive.

Output

Print a single number, the number of cells in the hive.

Examples2

  1. Example 1

    Input
    1
    
    Expected output
    1
    
  2. Example 2

    Input
    3
    
    Expected output
    19