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.PrintStream;
import java.util.Arrays;
import java.util.Set;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.StringTokenizer;
import java.util.SplittableRandom;
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;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskE1 solver = new TaskE1();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskE1 {
        List<String> ans = new ArrayList<>();

        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            if (false) {
//        if (true) {
                for (int n = 3; n < (int) 1e6; n += 2) {
//            for (int n = 262141; n < (int) 1e6; n += 2) {
                    ans.clear();
                    solve(n);
                    System.out.println(n);
                    if (ans.size() > (int) 1e5) {
                        throw new AssertionError();
                    }

//                System.out.println(ans.size());
                    if (!check(ans, n)) {
                        System.out.println(ans);
                        throw new AssertionError();
                    }
                }
            }

            int n = in.nextInt();
            solve(n);
            out.println(ans.size());
            for (String s : ans) {
                out.println(s);
            }
        }

        private boolean check(List<String> ans, long n) {
            Set<Long> set = new HashSet<>();
            set.add(n);
            long MAX = (long) 5e18;
            for (String s : ans) {
                String[] parts = s.split(" ");
                long a = Long.parseLong(parts[0]);
                long b = Long.parseLong(parts[2]);
                if (a < 0 || b < 0) {
                    System.out.println("Negative number: " + s);
                    return false;
                }
                if (a > MAX || b > MAX) {
                    System.out.println("Number too big: " + s);
                    return false;
                }
                if (!set.contains(a)) {
                    System.out.println("does not contain " + a);
                    return false;
                }
                if (!set.contains(b)) {
                    System.out.println("does not contain " + b);
                    return false;
                }
                String op = parts[1];
                if (op.equals("+")) {
                    set.add(a + b);
                } else {
                    set.add(a ^ b);
                }
            }
            if (!set.contains(1L)) {
                System.out.println("does not contain " + 1);
                return false;
            }
            return true;
        }

        private void solve(long n) {
            List<Long> a = new ArrayList<>();
            for (int i = 0; i < 30; i++) {
                a.add(n << i);
                if (i > 0) {
                    ans.add((n << (i - 1)) + " + " + (n << (i - 1)));
                }
            }
            SplittableRandom random = new SplittableRandom(0);
            while (!gauss(a.toArray(new Long[0]), false)) {
                int i = random.nextInt(a.size());
                int j = random.nextInt(a.size());
                a.add(a.get(i) + a.get(j));
                ans.add(a.get(i) + " + " + a.get(j));
            }
            gauss(a.toArray(new Long[0]), true);
        }

        private boolean gauss(Long[] a, boolean print) {
            Long[] origA = a.clone();
            int[] basis = new int[a.length];
            Arrays.fill(basis, -1);
            for (int i = 0; i < a.length; i++) {
                if (a[i] == 0) {
                    continue;
                }
                int bit = Long.numberOfTrailingZeros(a[i]);
                basis[i] = bit;
                for (int j = i + 1; j < a.length; j++) {
                    if (((a[j] >> bit) & 1) == 0) {
                        continue;
                    }
                    a[j] ^= a[i];
                }
            }
            for (int i = a.length - 1; i >= 0; i--) {
                if (basis[i] < 0) {
                    continue;
                }
                int bit = basis[i];
                for (int j = 0; j < a.length; j++) {
                    if (((a[j] >> bit) & 1) == 0) {
                        continue;
                    }
                    if (j == i) {
                        continue;
                    }
                    a[j] ^= a[i];
                }
            }

            boolean res = false;
            for (long x : a) {
                if (x == 1) {
                    res = true;
                }
            }

            if (print) {
                a = origA;
                for (int i = 0; i < a.length; i++) {
                    if (basis[i] < 0) {
                        continue;
                    }
                    int bit = basis[i];
                    for (int j = i + 1; j < a.length; j++) {
                        if (((a[j] >> bit) & 1) == 0) {
                            continue;
                        }
                        if (basis[j] < 0) {
                            continue;
                        }
                        ans.add(a[i] + " ^ " + a[j]);
                        a[j] ^= a[i];
                    }
                }
                for (int i = a.length - 1; i >= 0; i--) {
                    if (basis[i] < 0) {
                        continue;
                    }
                    int bit = basis[i];
                    for (int j = 0; j < a.length; j++) {
                        if (((a[j] >> bit) & 1) == 0) {
                            continue;
                        }
                        if (j == i) {
                            continue;
                        }
                        if (basis[j] < 0) {
                            continue;
                        }
                        ans.add(a[i] + " ^ " + a[j]);
                        a[j] ^= a[i];
                    }
                }
            }
            return res;
        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

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

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}