eolymp
bolt
Try our new interface for solving problems
Problems

Triangles from Matches

Triangles from Matches

prb35 Professor Samodelkin decided to show his mental abilities again from problem "Match model". He started to construct the triangles with matches.

What is the minimal number of matches needs Samodelkin to construct n triangles with side of one match.

Input

One number n (n < 2*109).

Output

Print the number of used matches.

Time limit 1 second
Memory limit 122.17 MiB
Input example #1
2
Output example #1
5