QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 512 MB Total points: 100

#6182. 6G Network Problem

Statistics

6G networks will be a fully connected world integrating terrestrial wireless and satellite communications. By incorporating satellite communication into 6G mobile communication to achieve seamless global coverage, network signals will be able to reach any remote village, allowing patients deep in the mountains to receive telemedicine and children to receive remote education. 6G technology will utilize the Terahertz (THz) frequency band, and the "densification" of 6G networks will reach an unprecedented level. In a 6G network environment, our surroundings will be filled with small base stations. When designing the distribution of small base stations for a 6G network, the coverage area can be abstracted as a square composed of $m \times m$ grid cells. We mark the centers of $k$ grid cells in this square as the locations of small base stations, with the technical requirement that: among these $k$ small base stations, no $4$ base stations can form the $4$ vertices of a rectangle whose sides are parallel to the sides of the square.

For example, when $m = 7$, a distribution of small base stations that meets the design requirements is shown in the figure.

Original image missing.

6G Network Problem: For a given square composed of $m \times m$ grid cells, calculate the maximum number of 6G network small base stations that can be placed while satisfying the design requirements.

Input

Each test case contains multiple sets of test data. The first line of each test data set contains an integer $m$, representing that the given 6G network is a square composed of $m \times m$ grid cells.

Output

For each test data set, output the maximum number of 6G network small base stations that can be placed in the given $m \times m$ square while satisfying the design requirements.

Examples

Input 1

3
7

Output 1

6
21

Subtasks

$20\%$ of the test data satisfies $n \leq 10\,000$.

$100\%$ of the test data satisfies $n \leq 10^9$.

Note

  1. The number of test data sets was not provided during the contest; "participants are expected to evaluate this themselves."
  2. This problem is, in fact, an unsolvable/erroneous problem; it is retained here only for reference.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.