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 io
import os

from collections import Counter, defaultdict, deque


def solve(X,):
    ops = []

    def plus(x, y):
        ops.append(str(x) + " + " + str(y))
        return x + y

    def xor(x, y):
        ops.append(str(x) + " ^ " + str(y))
        return x ^ y

    # nums[i] has their rightmost bit at pos i
    nums = [X]
    for i in range(X.bit_length()):
        nums.append(plus(nums[-1], nums[-1]))

    # Clear lower bits, all remaining bits of curr except for pos 0 should be at "high" positions
    curr = X
    for i in range(1, X.bit_length() + 1):
        if (1 << i) & curr:
            curr = xor(curr, nums[i])
    assert curr & ((1 << X.bit_length()) - 1) == 1

    # Create a number ending with '01'
    if X % 4 == 1:
        Y = X
    else:
        assert X % 4 == 3
        Y = xor(X, plus(X, X))
    # Shift Y until overlap with original Y on only the lowest bit
    Y2 = Y
    for i in range(Y.bit_length() - 1):
        Y2 = plus(Y2, Y2)
    assert Y & Y2 == (1 << (Y.bit_length() - 1))

    # The single overlap bit will overflow (for plus) or zero out (for xor)
    # Xoring these two will result in a single remaining bit
    pow2 = xor(plus(Y, Y2), xor(Y, Y2))
    assert bin(pow2).count("1") == 1

    # Shift that single bit up to clear all remaining high bits of curr
    while curr != 1:
        if pow2 & curr:
            curr = xor(pow2, curr)
        pow2 = plus(pow2, pow2)
    assert len(ops) <= 100000
    return str(len(ops)) + "\n" + "\n".join(ops)


if False:
    for x in range(3, 100000, 2):
        solve(x)

if __name__ == "__main__":
    input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

    (X,) = [int(x) for x in input().split()]
    ans = solve(X,)
    print(ans)