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:
from math import log2, ceil

def lg(val):
    """
    Devuelve el ceil del logaritmo en base 2 de val
    """
    return ceil(log2(val))

class Xum:
    """
    Computa una posible solución al problema 1247E de Codeforces
    """
    
    def __init__(self, x):
        self.board = [x]   # Inicia la pizarra con el valor de x
        self.actions = []  # Guarda la representación textual de las operaciones realizadas
        
        self.x2i_index = 1 # Índices usados para recordar las posiciobes de determinados valores
        self.x_index = 0 
        if self.isOn(x, 1): # Aquí se checkea la condición expuesta en el punto 1 del Algoritmo
            self.performSum(self.getLast(), self.getLast())
            self.performXor(self.board[0], self.board[1])
            self.x2i_index = 3
            self.x_index = 2
            
        self.k = lg(self.getLast()) # Se calcula la cantidad de bits de x
        self.generateProducts() # Se generan los productos 2^i * x
        self.constructP()  # Se construye el valor p descrito en 3
        self.performSum(self.getLast(), self.board[self.x_index])
        self.performXor(self.board[-2], self.board[self.x_index])
        self.performXor(self.board[-2], self.board[-1]) # Se añade el 2 a la pizarra
        self.index_2 = len(self.board)-1
        self.powerOf2() # Se añaden las potencias de dos a la pizarra
        self.maskX() # Se enmascara la entrada con las potencias de dos para apagar bits
        
        
    def isOn(self, val, index):
        """
        Devuelve True si el bit en la posición index (contando desde 0) está en 1
        """
        return (val >> index) & 1
    
    def performSum(self, a, b):
        """
        Suma a y b y escribe el resultado en la pizarra
        También retorna el valor
        """
        s = a+b
        self.board.append(s)
        self.actions.append(f'{a} + {b}')
        return s
        
    def performXor(self, a, b):
        """
        Xor a y b y escribe el resultado en la pizarra
        También retorna el valor
        """
        xor = a ^ b
        self.board.append(xor)
        self.actions.append(f'{a} ^ {b}')
        return xor
        
    
    def getLast(self):
        """
        Devuelve el último elemento escrito en la pizarra
        """
        return self.board[-1]
    
    def generateProducts(self):
        """
        Genera los productos 2^i * x donde x es el último elemento en la pizarra
        """
        for i in range(1, self.k+1):
            self.performSum(self.getLast(), self.getLast())
            
    def constructP(self):
        """
        Construye el número basado en lo descrito en el paso 3 del Algoritmo
        """
        p = self.board[self.x_index]
        for i in range(1, self.k+1):
            if self.isOn(p, i):
                p = self.performXor(p, self.board[self.x2i_index + i - 1])
                
    def powerOf2(self):
        """
        Devuelve las potencias de 2. 
        """
        assert(self.getLast() == 2) # El ultimo elemento escrito en la pizarra debe ser 2
        for i in range(2, self.k+1):
            self.performSum(self.getLast(), self.getLast())
                
    def maskX(self):
        """
        Apaga los bits de x uno a uno hasta obtener 1
        """
        x = self.board[self.x_index]
        for i in range(1, self.k+1):
            if self.isOn(x, i):
                x = self.performXor(x, self.board[self.index_2 + i - 1])
    
    def __str__(self):
        total = str(len(self.actions)) + '\n'
        return total + '\n'.join(self.actions) 
    
def xum(x):
    sol = Xum(x)
    print(sol)

if __name__ == '__main__':
    x = int(input())
    xum(x)