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 PYTHON):

Solution:
from collections import Counter, defaultdict, deque
import bisect
from sys import stdin, stdout
from itertools import repeat
import math
import random

# sys.stdin = open('input')

def mod(x, y, mod):
    re = 1
    now = x
    while y:
        if y&1:
            re *= now
            re %= mod
        y >>= 1
        now = (now*now)%mod
    return re

def inp(force_list=False):
    re = map(int, raw_input().split())
    if len(re) == 1 and not force_list:
        return re[0]
    return re

def inst():
    return raw_input().strip()

def gcd(x, y):
   while(y):
       x, y = y, x % y
   return x

def ggcd(x, y):
    if y:
        return ggcd(y, x%y)
    return x

def exgcd(a, b):
    s = 0; olds = 1
    t = 1; oldt = 0
    r = b; oldr = a
    while r:
        q = oldr // r
        oldr, r = r, oldr-q*r
        olds, s = s, olds-q*s
        oldt, t = t, oldt-q*t
    return oldr, olds, oldt # gcd, bezout coefficients

MOD = int(1e9+7)

def my_main():
    T = 1
    ans = []
    for _ in range(T):
        n = inp()
        for i in range(0, 32):
            ans.append('%d + %d' %((2**i)*n, (2**i)*n))
        def get(tt, tmpx):
            now = 1
            sm = 0
            while tt:
                if tt&1:
                    if sm!=0:
                        ans.append('%d + %d' %(sm, now*tmpx))
                    sm += now*tmpx
                tt >>= 1
                now *=2
        for i in range(1000000):
            x, y = n, ((i+1)*n)^((i+2)*n)
            # print x,y, gcd(x,y)
            if gcd(x, y) == 1:
                get(i+1, n)
                get(i+2, n)
                ans.append('%d ^ %d' %((i+1)*n, (i+2)*n))
                break
        # print x,y,'??????????'
        for i in range(0, 41):
            (2**i)*x < 1e18 and ans.append('%d + %d' %((2**i)*x, (2**i)*x))
            (2**i)*y < 1e18 and ans.append('%d + %d' %((2**i)*y, (2**i)*y))
        d, a, b = exgcd(x, y)
        if a < 0:
            a, b, x, y = b, a, y, x
        b *= -1
        get(a, x)
        get(b, y)
        ans.append('%d + %d' %(a*x, b*y))
        ans.append('%d + %d' %(b*y, b*y))
        ans.append('%d ^ %d' %(a*x+b*y, b*y+b*y))
        print len(ans)
        print '\n'.join(ans)







my_main()