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:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        EXum solver = new EXum();
        solver.solve(1, in, out);
        out.close();
    }

    static class EXum {
        private PrintWriter out;
        private boolean DEBUG = false;
        List<String> ans;

        long add(long x, long y) {
            ans.add(String.format("%d + %d%n", x, y));
            if (DEBUG)
                out.println("  >>  " + (x + y));
            return x + y;
        }

        long xor(long x, long y) {
            ans.add(String.format("%d ^ %d%n", x, y));
            if (DEBUG)
                out.println("##>>  " + (x ^ y));
            return x ^ y;
        }

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            ans = new ArrayList<>();
            this.out = out;
            long x = in.nextLong();

            if (x % 4 == 3) {
                x = xor(x, add(x, x));
            }

            int mod = Integer.highestOneBit((int) x) * 4;
            //Systemout.println("mod = " + mod);

            long[] last = new long[mod];

            for (int i = 1; ; i++) {
                long v = x * i;

                int index = (int) (v % mod);
                int target = (int) ((v ^ 1) % mod);
                if (last[target] > 0) {
                    long u = last[target] * x;
                    //Systemout.println("Pii.of(u, v) = " + Pll.of(u, v));
                    get(u, x);
                    get(v, x);
                    u = xor(u, v);
                    v = add(u, x);
                    long w = xor(u, v);
                    long two = xor(x, w);
                    Util.ASSERT(two == 2);
                    break;
                }
                last[index] = i;
            }

            get(x - 1, 2);
            xor(x, x - 1);

            out.println(ans.size());
            for (String s : ans) {
                out.print(s);
            }
        }

        public void get(long target, long x) {
            Util.ASSERT(target % x == 0);
            long b = target / x - 1;
            long val = x;
            long aux = x;
            while (b > 0) {
                if (b % 2 == 1) {
                    val = add(val, aux);
                }
                aux = add(aux, aux);
                b /= 2;
            }
        }

    }

    static class InputReader {
        public final BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }

    static class Util {
        public static void ASSERT(boolean assertion) {
            if (!assertion)
                throw new AssertionError();
        }

        private Util() {
        }

    }
}