3049: Cellular Mobile Communication

时间限制:1000 ms 内存限制:128 MB
上传者:
提交:1 通过:1

题目描述

$PSacfc$ is a student majors in $Communication \ Engineering$, and $Wireless \ Mobile \ System$ is his favorite course.

One day, when the teacher talked about $Cellular \ Mobile \ Communication$, he thought of a problem. Given $n$ regular hexagons, find the minimum number of sides exposed. A side of a regular hexagon exposed means no other hexagons' sides coincided with it. One side can be coincided with no more than one another.

For example, the first situation has $3$ hexagons with $12$ sides exposed, and the second situation has $3$ hexagons with $14$ sides exposed.


Your task is to find the minimum number of sides exposed with $n$ regular hexagons.

输入格式

The first line contains an integer number $T$, the number of test cases.

$i^{th}$ of each next $T$ lines contains an integer number $n(1 \leq x \leq 10^{9})$.

输出格式

For each test case print a number, minimum number of sides exposed.

输入样例 复制

3
3
4
7

输出样例 复制

12
14
18