P25304 [AtCoder] Pizza
提高
题目描述

Problem Description

A pizza in the shape of an isosceles triangle is to be cut and distributed among $ N $ people. The pizza is cut with lines parallel to the base at equal intervals. This results in pieces with area ratios of $ 1:3:5:... $. When distributing the pieces to each person to ensure equal area, determine the minimum number of pieces the pizza needs to be divided into.

Input Format

The input is given from the standard input in the following format:

$ N $

  • The first line contains an integer $N\ (1\ ≦\ N\ ≦\ 1,000)$ representing the number of people.

Output Format

Output the minimum number of pieces the pizza needs to be divided into on a single line. Ensure a newline at the end of the output.

Sample Input and Output

Sample Input #1

1

Sample Output #1

1

Sample Input #2

2

Sample Output #2

4

Sample Input #3

3

Sample Output #3

6

Notes/Hints

Sample Explanation 1

When distributing to 1 person, the pizza can remain as a single piece.

Sample Explanation 2

For 2 people, one person can receive pieces with area ratios of $ 3 $ and $ 5 $, and the other person can receive pieces with area ratios of $ 1 $ and $ 7 $, ensuring equal area.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1
样例输出
1