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:
#!/usr/bin/env python
from __future__ import division, print_function
from operator import *

import os
import sys
from io import BytesIO, IOBase
#from types import ModuleType

#sys.setrecursionlimit(1 << 20)
class TailRecurseException(BaseException):
    def __init__(self, args, kwargs):
        self.args = args
        self.kwargs = kwargs

# https://code.activestate.com/recipes/474088-tail-call-optimization-decorator/
def tail_call_optimized(g):
    """
    This function decorates a function with tail call
    optimization. It does this by throwing an exception
  if it is it's own grandparent, and catching such
    exceptions to fake the tail call optimization.
    
  This function fails if the decorated
    function recurses in a non-tail context.
    """
    def func(*args, **kwargs):
        f = sys._getframe()
        if f.f_back and f.f_back.f_back and f.f_back.f_back.f_code == f.f_code:
            raise TailRecurseException(args, kwargs)
        else:
            while 1:
                try:
                    return g(*args, **kwargs)
                except TailRecurseException as e:
                    args = e.args
                    kwargs = e.kwargs
    func.__doc__ = g.__doc__
    return func
def identity(g): return g
tco = identity

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

from collections import defaultdict

____dm = None
ONLINE_JUDGE = __debug__

def inputline():
    global inp
    inp = input().split()
    inp.reverse()

def readint(): return int(inp.pop())
def readfloat(): return float(inp.pop())
def nextline(): return inputline()
def void(*arg): return None
displayln = print
println = print
if ONLINE_JUDGE:
    dbgln = void
else:
    dbgln = print
def add1(x): return x + 1
def sub1(x): return x - 1
def ceildiv(a, b): return -(-a // b)

def g231():
    ##@tco
    def lo_0(x_1):
        ##@tco
        def do_3(j_4):
            g133 = gt(j_4, x_1)
            if g133 != False:
                return j_4
            else:
                g134 = mul(2, j_4)
                return do_3(g134)
        g135 = do_3
        lb2_2 = g135(1)
        ##@tco
        def do_5(i_6, j_7, t_8):
            g136 = gt(j_7, x_1)
            if g136 != False:
                return t_8
            else:
                g137 = truediv(i_6, 2)
                g138 = add(j_7, i_6)
                g139 = add1(t_8)
                return do_5(g137, g138, g139)
        g140 = do_5
        g141 = truediv(lb2_2, 4)
        g142 = truediv(lb2_2, 2)
        return g140(g141, g142, 0)
    global cnt_9
    cnt_9 = 120
    ##@tco
    def solve_lo1_10(x_11):
        global cnt_9
        ##@tco
        def do_13(i_14, j_15):
            g143 = gt(j_15, x_11)
            if g143 != False:
                return i_14
            else:
                g144 = add1(i_14)
                g145 = mul(2, j_15)
                return do_13(g144, g145)
        g146 = do_13
        btx_12 = g146(0, 1)
        g147 = sub(btx_12, 1)
        g148 = pow(2, g147)
        y_16 = mul(x_11, g148)
        i_17 = sub(btx_12, 1)
        ##@tco
        def do_18(x_19, i_20):
            global cnt_9
            g149 = eq(i_20, 0)
            if g149 != False:
                return None
            else:
                g150 = sub1(cnt_9)
                _151 = cnt_9 = g150

                void()
                print(x_19, "+", x_19)
                g152 = mul(2, x_19)
                g153 = sub(i_20, 1)
                return do_18(g152, g153)
        g154 = do_18
        g154(x_11, i_17)
        a_21 = add(y_16, x_11)
        g155 = sub1(cnt_9)
        _156 = cnt_9 = g155

        void()
        print(y_16, "+", x_11)
        b_22 = xor(y_16, x_11)
        g157 = sub1(cnt_9)
        _158 = cnt_9 = g157

        void()
        print(y_16, "^", x_11)
        c_23 = xor(a_21, b_22)
        g159 = sub1(cnt_9)
        _160 = cnt_9 = g159

        void()
        print(a_21, "^", b_22)
        loc_24 = lo_0(c_23)
        g161 = gt(loc_24, 1)
        if g161 != False:
            c2_25 = add(c_23, c_23)
            a_27 = c_23
            b_26 = c_23
            g162 = sub1(cnt_9)
            _163 = cnt_9 = g162

            void()
            print(a_27, "+", b_26)
            q_28 = xor(c_23, c2_25)
            a_29 = c_23
            g164 = sub1(cnt_9)
            _165 = cnt_9 = g164

            void()
            print(a_29, "^", c2_25)
            g166 = pow(2, loc_24)
            w_30 = mul(q_28, g166)
            ##@tco
            def do_31(x_32, i_33):
                global cnt_9
                g167 = eq(i_33, 0)
                if g167 != False:
                    return None
                else:
                    g168 = sub1(cnt_9)
                    _169 = cnt_9 = g168

                    void()
                    print(x_32, "+", x_32)
                    g170 = mul(2, x_32)
                    g171 = sub(i_33, 1)
                    return do_31(g170, g171)
            g172 = do_31
            g172(q_28, loc_24)
            qa_34 = add(q_28, w_30)
            g173 = sub1(cnt_9)
            _174 = cnt_9 = g173

            void()
            print(q_28, "+", w_30)
            qb_35 = xor(q_28, w_30)
            g175 = sub1(cnt_9)
            _176 = cnt_9 = g175

            void()
            print(q_28, "^", w_30)
            qc_36 = xor(qa_34, qb_35)
            g177 = sub1(cnt_9)
            _178 = cnt_9 = g177

            void()
            print(qa_34, "^", qb_35)
            g179 = mul(2, q_28)
            qd_37 = xor(qc_36, g179)
            b_38 = mul(2, q_28)
            g180 = sub1(cnt_9)
            _181 = cnt_9 = g180

            void()
            print(qc_36, "^", b_38)
            g182 = sub(loc_24, 1)
            g183 = pow(2, g182)
            qe_39 = mul(qd_37, g183)
            i_40 = sub(loc_24, 1)
            ##@tco
            def do_41(x_42, i_43):
                global cnt_9
                g184 = eq(i_43, 0)
                if g184 != False:
                    return None
                else:
                    g185 = sub1(cnt_9)
                    _186 = cnt_9 = g185

                    void()
                    print(x_42, "+", x_42)
                    g187 = mul(2, x_42)
                    g188 = sub(i_43, 1)
                    return do_41(g187, g188)
            g189 = do_41
            g189(qd_37, i_40)
            qqq_44 = xor(q_28, qe_39)
            g190 = sub1(cnt_9)
            _191 = cnt_9 = g190

            void()
            print(q_28, "^", qe_39)
            _192 = c_23 = qqq_44

            void()
        else:
            None
        g193 = sub(btx_12, 2)
        g194 = pow(2, g193)
        mul(c_23, g194)
        x_46 = c_23
        i_45 = sub(btx_12, 2)
        ##@tco
        def do_47(x_48, i_49):
            global cnt_9
            g195 = eq(i_49, 0)
            if g195 != False:
                return None
            else:
                g196 = sub1(cnt_9)
                _197 = cnt_9 = g196

                void()
                print(x_48, "+", x_48)
                g198 = mul(2, x_48)
                g199 = sub(i_49, 1)
                return do_47(g198, g199)
        g200 = do_47
        g200(x_46, i_45)
        ##@tco
        def do_51(i_52, k_53, j_54):
            g201 = eq(i_52, c_23)
            if g201 != False:
                return j_54
            else:
                g202 = mul(2, i_52)
                g203 = mul(2, k_53)
                g204 = and_(j_54, i_52)
                g205 = eq(g204, 0)
                def g208():
                    global cnt_9
                    if g205 != False:
                        return j_54
                    else:
                        nj_55 = xor(j_54, k_53)
                        g206 = sub1(cnt_9)
                        _207 = cnt_9 = g206

                        void()
                        print(j_54, "^", k_53)
                        return nj_55
                g208 = g208()
                return do_51(g202, g203, g208)
        g209 = do_51
        g210 = mul(2, x_11)
        global f_50
        f_50 = g209(2, g210, x_11)
        ##@tco
        def do_56(qq_57):
            global f_50
            global cnt_9
            g211 = gt(qq_57, f_50)
            if g211 != False:
                return None
            else:
                g212 = and_(qq_57, f_50)
                g213 = gt(g212, 0)
                if g213 != False:
                    nf_58 = xor(qq_57, f_50)
                    b_59 = f_50
                    g214 = sub1(cnt_9)
                    _215 = cnt_9 = g214

                    void()
                    print(qq_57, "^", b_59)
                    _216 = f_50 = nf_58

                    void()
                else:
                    None
                g217 = mul(2, qq_57)
                return do_56(g217)
        g218 = do_56
        return g218(c_23)
    n_60 = readint()
    print(120)
    g219 = eq(n_60, 1)
    if g219 != False:
        None
    else:
        g220 = lo_0(n_60)
        g221 = gt(g220, 1)
        if g221 != False:
            x2_61 = add(n_60, n_60)
            g222 = sub1(cnt_9)
            _223 = cnt_9 = g222

            void()
            print(n_60, "+", n_60)
            y_62 = xor(n_60, x2_61)
            g224 = sub1(cnt_9)
            _225 = cnt_9 = g224

            void()
            print(n_60, "^", x2_61)
            solve_lo1_10(y_62)
        else:
            solve_lo1_10(n_60)
    @tail_call_optimized
    def do_63(cnt_64):
        global cnt_9
        g226 = eq(cnt_64, 0)
        if g226 != False:
            return None
        else:
            g227 = sub1(cnt_9)
            _228 = cnt_9 = g227

            void()
            print(n_60, "+", n_60)
            g229 = sub1(cnt_64)
            return do_63(g229)
    g230 = do_63
    return g230(cnt_9)
_232 = main = g231

void()
None
 
# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    inputline()
    main()