P28180 [洛谷] [SHOI2002] Pepsi World Cup Journey
提高-
题目描述

Background

"…Any Pepsi drink purchased before June 2002 will have a Pepsi star's name on the bottle cap. By collecting all the names of Pepsi stars, you can enter the draw for the Pepsi World Cup Journey, winning a球星 backpack, a portable music player, and even a trip to Japan and South Korea to watch the World Cup. Don't hesitate, act now!"

Problem Description

You turn off the TV and think: Suppose there are \( n \) different star names, each with an equal probability of appearing. On average, how many bottles of drinks do you need to buy to collect all the names?

Input Format

The input consists of a single integer on one line, representing the number of different star names \( n \).

Output Format

Output the average number of bottles needed to collect all the names. If it is an integer, output it directly. Otherwise, output it in fractional format. For example, three and three twentieths should be output as:

 3
5--
20

The first line is the numerator of the fractional part, the second line starts with the integer part followed by a line made of minus signs, and the third line is the denominator. The number of minus signs should be equal to the number of digits in the denominator. The first digit of the numerator and the denominator should be aligned with the first minus sign.

The fraction must be irreducible.

Sample Input and Output

Sample Input #1

2

Sample Output #1

3

Sample Input #2

17

Sample Output #2

  340463
58------
  720720

Notes

Data Range and Constraints

For all test cases, it is guaranteed that \( 2 \leq n \leq 33 \).

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2
样例输出
3