题目描述
Problem Description
In order to achieve good results at the CODE FESTIVAL finals, Iroha has been practicing every day for the past 12 years. Today, she has decided to practice with the "Addition-Subtraction Game". This game is played as follows:
- A number \( G \) is displayed on an electronic bulletin board. Initially, \( G = 0 \).
- The player can perform the following operation up to 320 times: choose an integer \( x \) between 1 and \( N \) (inclusive), and add \( 1/x \) to \( G \), or subtract \( 1/x \) from \( G \). However, \( G \) must not be negative.
- The game is cleared when \( G \) is set to the smallest possible value other than 0 that \( G \) can take.
Iroha wants to clear the game quickly. Help her by outputting a way to clear the game.
Input Format
The input is given from the standard input in the following format:
\( N \)
Output Format
The output should be in the following format:
\( Q \) \( op_1 \) \( x_1 \) \( op_2 \) \( x_2 \) \( op_3 \) \( x_3 \) ... \( op_Q \) \( x_Q \)
- \( Q \) is the number of operations you perform. The value of \( Q \) must be 320 or less.
- \( op_i \) is the type of operation performed in the \( i \)-th turn.
+means "add \( 1/x_i \)" and-means "subtract \( 1/x_i \)" from \( G \).
Sample Input and Output
Sample Input #1
2
Sample Output #1
3
+ 2
+ 2
- 2
Sample Input #2
3
Sample Output #2
3
+ 3
+ 3
- 2
Sample Input #3
4
Sample Output #3
5
+ 3
+ 3
- 2
+ 4
- 3
Sample Input #4
7
Sample Output #4
10
+ 1
- 3
- 7
- 7
+ 2
- 4
- 7
- 5
- 7
- 7
Notes/Hints
Constraints
- \( N \) is an integer between 1 and 100 inclusive.
Sample Explanation 1
The smallest value \( G \) can take other than 0 is \( 1/2 \). In the output, the value of \( G \) changes as follows:
- Initially, \( G = 0 \).
- Then, \( 1/2 \) is added to \( G \). The value of \( G \) changes to \( 1/2 \).
- Then, \( 1/2 \) is added to \( G \). The value of \( G \) changes to \( 1 \).
- Finally, \( 1/2 \) is subtracted from \( G \). The value of \( G \) changes to \( 1/2 \).
Sample Explanation 2
The smallest value \( G \) can take other than 0 is \( 1/6 \). In the output, the value of \( G \) changes as follows:
- Initially, \( G = 0 \).
- Then, \( 1/3 \) is added to \( G \). The value of \( G \) changes to \( 1/3 \).
- Then, \( 1/3 \) is added to \( G \). The value of \( G \) changes to \( 2/3 \).
- Finally, \( 1/2 \) is subtracted from \( G \). The value of \( G \) changes to \( 1/6 \).
Sample Explanation 3
The smallest value \( G \) can take other than 0 is \( 1/12 \). In the output, the value of \( G \) changes as follows:
- Initially, \( G = 0 \).
- Then, \( 1/3 \) is added to \( G \). The value of \( G \) changes to \( 1/3 \).
- Then, \( 1/3 \) is added to \( G \). The value of \( G \) changes to \( 2/3 \).
- Then, \( 1/2 \) is subtracted from \( G \). The value of \( G \) changes to \( 1/6 \).
- Then, \( 1/4 \) is added to \( G \). The value of \( G \) changes to \( 5/12 \).
- Finally, \( 1/3 \) is subtracted from \( G \). The value of \( G \) changes to \( 1/12 \).
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分