eolymp
bolt
Try our new interface for solving problems
Problems

Coupons

Coupons

Coupons in cereal boxes are numbered \textbf{1} to \textbf{n}, and a set of one of each is required for a prize (a cereal box, of course). With one coupon per box, how many boxes on average are required to make a complete set of \textbf{n} coupons? \InputFile Input consists of a sequence of lines each containing a single positive integer \textbf{n}, \textbf{1} ≤ \textbf{n} ≤ \textbf{33}, giving the size of the set of coupons. Input is terminated by end of file. \OutputFile For each input line, output the average number of boxes required to collect the complete set of \textbf{n} coupons. If the answer is an integer number, output the number. If the answer is not integer, then output the integer part of the answer followed by a space and then by the proper fraction in the format shown below. The fractional part should be irreducible. There should be no trailing spaces in any line of output.
Time limit 1 second
Memory limit 64 MiB
Input example #1
2
5
17
Output example #1
3
   5
11 --
   12
   340463
58 ------
   720720

Example description: For convenience in Example output the spaces are shown as dots