F. Flower
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

In the serene waters of the Amazon, riverside legends tell of a magical Victoria water lily. Unlike ordinary flowers, this one reacts to offerings. When seeds are placed in its center, the flower gently closes its petals and dives into the river. Moments later, it resurfaces and blooms, returning a strictly greater quantity of seeds.

This flower's magic does not act at random; it applies a deterministic, unchanging rule to compute the return. The flower keeps no memory of previous offerings: the amount returned depends only on the quantity of seeds deposited in that particular offering. The sages of the forest guarantee that the transformation obeys the following natural laws, which together guarantee a single possible outcome for each offering:

  • The Law of the Whole Seed: The flower operates exclusively with integer quantities of seeds.
  • The Justice of the Waters: Strictly larger offerings always result in strictly larger returns.
  • Moapy: In the language of the ancients, the word means "three". It describes the flower's supreme secret. If you take all the seeds returned by an initial offering and deposit them into the flower again, the final amount returned will be exactly three times that initial offering.

On your journey, you found the rare Victoria water lily and deposited exactly $$$N$$$ seeds into it. The flower closed, sank, and bloomed exactly once (not twice!). However, the snap of a branch in the woods startled you, causing you to quickly stash the return in your pocket without having time to count it. Knowing the exact amount you offered at the start, you need to figure out how many seeds you now have with you.

Input

The input contains a single integer $$$N$$$ ($$$1 \leq N \leq 10^{7}$$$), representing the initial quantity of seeds offered to the flower.

Output

Print a single integer representing the quantity of seeds the flower returned after blooming exactly once.

Examples
Input
1
Output
2
Input
2
Output
3
Input
13
Output
22