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

Solution:
//stan hu tao
//join nct ridin by first year culture reps
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import static java.lang.System.out;
import java.util.*;
import java.io.*;
import java.math.*;

public class x1427E
{
    static final long MAX = 1L<<40;
    public static void main(String hi[]) throws Exception
    {
        BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
        long X = Long.parseLong(infile.readLine());
        int res = 1;
        StringBuilder sb = new StringBuilder(add(X, X));
        HashSet<Long> set = new HashSet<Long>();
        set.add(X); set.add(2*X);
        ArrayList<Long> ls = new ArrayList<Long>();
        ls.add(X);  ls.add(2*X);
        basis = new long[40];
        check(X, true);   check(2*X, true);
        while(true)
        {
            int a = (int)(Math.random()*ls.size());
            int b = (int)(Math.random()*ls.size());
            while(ls.get(a)+ls.get(b) >= MAX || !check(ls.get(a)+ls.get(b), false))
            {
                a = (int)(Math.random()*ls.size());
                b = (int)(Math.random()*ls.size());
            }
            sb.append(add(ls.get(a), ls.get(b)));
            res++;
            long newval = ls.get(a)+ls.get(b);
            ls.add(newval);
            set.add(newval);
            check(newval, true);
            if(!check(1L, false))
                break;
        }
        //find xor subset
        if(ls.size() <= 20)
        {
            for(int mask=0; mask < 1<<ls.size(); mask++)
            {
                long xor = 0L;
                for(int b=0; b < ls.size(); b++)
                    if((mask&(1<<b)) > 0)
                        xor ^= ls.get(b);
                if(xor == 1)
                {
                    xor = 0;
                    int prev = -1;
                    for(int b=0; b < ls.size(); b++)
                        if((mask&(1<<b)) > 0)
                        {
                            if(prev == -1)
                                xor = ls.get(b);
                            else
                            {
                                sb.append(xor(xor, ls.get(b)));
                                res++;
                                xor ^= ls.get(b);
                            }
                            prev = b;
                        }
                    break;
                }
            }
        }
        else
        {
            ArrayList<Long> ls1 = new ArrayList<Long>();
            ArrayList<Long> ls2 = new ArrayList<Long>();
            for(int i=0; i < 20; i++)
                ls1.add(ls.get(i));
            for(int i=20; i < ls.size(); i++)
                ls2.add(ls.get(i));
            HashMap<Long, Integer> map1 = new HashMap<Long, Integer>();
            for(int mask=0; mask < 1<<ls1.size(); mask++)
            {
                long xor = 0L;
                for(int b=0; b < ls1.size(); b++)
                    if((mask&(1<<b)) > 0)
                        xor ^= ls1.get(b);
                map1.put(xor, mask);
            }
            HashMap<Long, Integer> map2 = new HashMap<Long, Integer>();
            for(int mask=0; mask < 1<<ls2.size(); mask++)
            {
                long xor = 0L;
                for(int b=0; b < ls2.size(); b++)
                    if((mask&(1<<b)) > 0)
                        xor ^= ls2.get(b);
                map2.put(xor, mask);
            }
            for(long key: map1.keySet())
                if(map2.containsKey(key^1))
                {
                    int mask1 = map1.get(key);
                    int mask2 = map2.get(key^1);
                    long xor = 0L;
                    boolean prev = false;
                    for(int b=0; b < ls1.size(); b++)
                        if((mask1&(1<<b)) > 0)
                        {
                            if(!prev)
                                xor = ls1.get(b);
                            else
                            {
                                sb.append(xor(xor, ls1.get(b)));
                                res++;
                                xor ^= ls1.get(b);
                            }
                            prev = true;
                        }
                    for(int b=0; b < ls2.size(); b++)
                        if((mask2&(1<<b)) > 0)
                        {
                            if(!prev)
                                xor = ls2.get(b);
                            else
                            {
                                sb.append(xor(xor, ls2.get(b)));
                                res++;
                                xor ^= ls2.get(b);
                            }
                            prev = true;
                        }
                    break;
                }
        }
        System.out.println(res);
        System.out.print(sb);
    }
    static long[] basis;
    public static boolean check(long mask, boolean add)
    {
        for(int i=0; i < 40; i++)
        {
            if((mask&(1L<<i)) == 0)
                continue;
            if(basis[i] == 0)
            {
                if(add)
                    basis[i] = mask;
                return true;
            }
            mask ^= basis[i];
        }
        return false;
    }
    public static String add(long a, long b)
    {
        return a+" + "+b+"\n";
    }
    public static String xor(long a, long b)
    {
        return a+" ^ "+b+"\n";
    }
}