题库练习 Parking Lot
← 上一题 下一题 →

A10178 | Parking Lot

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

To quickly hire highly skilled specialists one of the new IT City companies made an unprecedented move. Every employee was granted a car, and an employee can choose one of four different car makes.

The parking lot before the office consists of one line of $(2n-2)$ parking spaces. Unfortunately the total number of cars is greater than the parking lot capacity. Furthermore even amount of cars of each make is greater than the amount of parking spaces! That's why there are no free spaces on the parking lot ever.

Looking on the straight line of cars the company CEO thought that parking lot would be more beautiful if it contained exactly $n$ successive cars of the same make. Help the CEO determine the number of ways to fill the parking lot this way.

输入格式

The only line of the input contains one integer $n$ ( $3<=n<=30$ ) — the amount of successive cars of the same make.

输出格式

Output one integer — the number of ways to fill the parking lot by cars of four makes using the described way.

输入输出样例

输入 #1
3
输出 #1
24
C++ 编辑器
输入
输出