Time

10:42:47
11 Feb 2012
ACM-ICPC Thailand Southern Region Programming Contest 2011
Left: 4 hours 18 minutes
End: 11.02.2012 15:00
Leader: Informatimukas
Five for week 22
Left: 11 hours 18 minutes
End: 11.02.2012 22:00
Leader: NuM
Version for print

Gardener-painter

prb17

   Gardener has to paint trees after planting. He has paint of three colour: white, blue and orange.

   How many ways he can paint of N trees, if not any two the same colours can be side by side?


Specifications

   Input

   The quantity of trees is N (1N50).

   Output

   The quantity of ways of paint.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 10
Complexity: 19% 679/836

Example

Example input

3

Example output

12


← Dragon Problems Paint2D →