
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?
The number of trees (1 \leq N \leq 50).
Output the number of possible ways to paint the trees.
Example 1