Tile Decoration

Given N, compute the perimeter of the rectangle formed by N spiral tiles whose side lengths follow the Fibonacci sequence, starting at 1, 1, 2, 3, 5, 8.

Easy3MathImplementationInterviewNo attempts yetTime limit2sMemory limit512 MB

Problem

A tile decoration in a park is made of square tiles glued together in a spiral, like the shell of a nautilus. It starts with a tile of side 1, and every tile added further out is larger. Part of the decoration looks like this.

The number written on a tile is the length of its side. Reading the side lengths from the innermost tile outward gives 1, 1, 2, 3, 5, 8, ... . From the third tile on, the side length of a tile is the sum of the side lengths of the two tiles before it.

Gluing NN tiles together by this rule always produces a single rectangle. For example, the rectangle formed by the first five tiles (drawn in red in the picture) has perimeter 26.

Given the number of tiles NN, write a program that computes the perimeter of the rectangle formed by those NN tiles.

Input

The first line contains an integer NN, the number of tiles. (1N801 \le N \le 80)

Output

Print the perimeter of the rectangle formed by the NN tiles on the first line.

The answer can exceed the 32-bit integer range, so use a 64-bit integer type.