Problem: You have a blackboard and initially only an odd number x is written on it. Your goal is to write the number 1 on the blackboard.

You may write new numbers on the blackboard with the following two operations. 

  * You may take two numbers (not necessarily distinct) already on the blackboard and write their sum on the blackboard. The two numbers you have chosen remain on the blackboard. 
  * You may take two numbers (not necessarily distinct) already on the blackboard and write their [bitwise XOR](https://en.wikipedia.org/wiki/Bitwise_operation#XOR) on the blackboard. The two numbers you have chosen remain on the blackboard. 

Perform a sequence of operations such that at the end the number 1 is on the blackboard.

Input

The single line of the input contains the odd integer x (3 ≤ x ≤ 999,999).

Output

Print on the first line the number q of operations you perform. Then q lines should follow, each describing one operation. 

  * The "sum" operation is described by the line "a + b", where a, b must be integers already present on the blackboard. 
  * The "xor" operation is described by the line "a ^ b", where a, b must be integers already present on the blackboard. 

The operation symbol (+ or ^) must be separated from a, b by a whitespace.

You can perform at most 100,000 operations (that is, q≤ 100,000) and all numbers written on the blackboard must be in the range [0, 5⋅10^{18}]. It can be proven that under such restrictions the required sequence of operations exists. You can output any suitable sequence of operations.

Examples

Input


3


Output


5
3 + 3
3 ^ 6
3 + 5
3 + 6
8 ^ 9


Input


123


Output


10
123 + 123
123 ^ 246
141 + 123
246 + 123
264 ^ 369
121 + 246
367 ^ 369
30 + 30
60 + 60
120 ^ 121

Solution (in PYTHON3):

Solution:
import sys

x = int(sys.stdin.readline())
ans = []
c = 0
while x > 1:
    if bin(x).count("0") == 1:
        z = x
        while (2 * z) + x != (2 * z) ^ x:
            ans.append(str(z) + " + " + str(z))
            z = z + z
        ans.append(str(x) + " + " + str(z))
        z1 = x + z
        ans.append(str(x) + " ^ " + str(z1))
        z2 = x ^ z1
        ans.append(str(x) + " + " + str(z2))
        z3 = x + z2
        ans.append(str(z1) + " ^ " + str(z3))
        z4 = z1 ^ z3
        ans.append(str(x) + " + " + str(x))
        z5 = x + x
        ans.append(str(z4) + " ^ " + str(z5))
        z6 = z4 ^ z5
        ans.append(str(x) + " ^ " + str(z6))
        x = x ^ z6
    else:
        c = c + 1
        z = x
        s = bin(x)[2:]
        i = 0
        while bin(x + z).count("1") % bin(x).count("1") == 0:
            i = i + 1
            ans.append(str(z) + " + " + str(z))
            z = z * 2
        ans.append(str(x) + " + " + str(z))
        y = x + z
        while len(bin(z)) < len(bin(y)):
            ans.append(str(z) + " + " + str(z))
            z = z * 2
        while y > x or y % 2 == 0:
            if y > x:
                while len(bin(z)) > len(bin(y)):
                    z = z // 2
                ans.append(str(z) + " ^ " + str(y))
                y = y ^ z
            else:
                while len(bin(y)) < len(bin(x)):
                    ans.append(str(y) + " + " + str(y))
                    y = y * 2
                ans.append(str(x) + " ^ " + str(y))
                y = x ^ y
        x = y

print(len(ans))
for i in ans:
    print(i)