P1291 [SHOI2002] Pepsi World Cup Tour
Background
"... Before June 2002, the cap of any Pepsi beverage will have the name of a Pepsi soccer star. As long as you collect all Pepsi soccer star names, you can enter the drawing for the Pepsi World Cup Tour, win a star backpack and a portable music player, and even go to Japan and South Korea to watch the World Cup. Hurry up!"
Description
You turn off the TV and think: assuming there are $n$ different star names and each name appears with equal probability, on average how many bottles do you need to buy to collect all the names?
Input Format
The input contains 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, print it directly. Otherwise, print it directly in fractional format. For example, five and three twentieths should be printed as:
```plain
3
5--
20
```
The first line is the numerator of the fractional part. The second line contains the integer part first, followed by a bar made of minus signs. The third line is the denominator. The number of minus signs should equal the number of digits in the denominator. The first digit of the numerator and the first digit of the denominator must align with the first minus sign. The fraction must be in lowest terms.
Explanation/Hint
### Constraints
For all testdata, it is guaranteed that $2 \leq n \leq 33$.
Translated by ChatGPT 5