Tap title to toggle menu

Totally Not Triangles

You are given an equilateral triangle. An iteration consists of taking every edge in the current figure and, if possible, using it as base for a new equilateral triangle.

Your task is to find the perimeter of the figure at iteration N.


Input

A single integer: N.

Output

A single integer: the perimeter of the figure.

Constraints

  • 1 ≤ N ≤ 109

Samples

InputOutput
13
415
1042