Cellular Mobile Communication
题号:NC15535
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
64bit IO Format: %lld

题目描述

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.
itℎ of each next T lines contains an integer number n(1 ≤ n ≤ 109).

输出描述:

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

输入

复制
3
3
4
7

输出

复制
12
14
18