Gardener-painter#17

Gardener-painter

1 second
64 megabytes
Easy
prb17

After planting the trees, the gardener needs to paint them. He has three colors of paint: white, blue, and orange. He must paint the trees so that no two adjacent trees have the same color. In how many different ways can the gardener paint the trees?

Input

The number of trees (1 \leq N \leq 50).

Output

Output the number of possible ways to paint the trees.

Examples

Example 1

Loading
Loading