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 static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.exit;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class E {

	static void solve() throws Exception {
		long x = scanLong();
		List<String> ans = new ArrayList<>();
		if ((x & 2) != 0) {
			ans.add(x + " + " + x);
			ans.add(2 * x + " + " + x);
			x *= 3;
		}
		int k = 63 - Long.numberOfLeadingZeros(x);
		for (int i = 0; i < k; i++) {
			ans.add((x << i) + " + " + (x << i));
		}
		ans.add(x + " + " + (x << k));
		ans.add((x + (x << k)) + " ^ " + (x << k));
		ans.add(((x + (x << k)) ^ (x << k)) + " ^ " + x);
		long y = 1;
		for (int i = 0; i < 5; i++) {
			y *= 2 - x * y;
		}
		System.err.println((x * y) & ((1L << (k + 1)) - 1));
		y &= (1L << (k + 1)) - 1;
		long r = x;
		for (int i = 62 - Long.numberOfLeadingZeros(y); i >= 0; i--) {
			ans.add(r + " + " + r);
			r += r;
			if ((y & (1L << i)) != 0) {
				ans.add(r + " + " + x);
				r += x;
			}
		}
		System.err.println(r + " " + x * y);
		for (int i = k + 1; r != 1; i++) {
			if ((r & (1L << i)) != 0) {
				ans.add(r + " ^ " + (1L << i));
				r ^= 1L << i;
			}
			if (r == 1) {
				break;
			}
			ans.add((1L << i) + " + " + (1L << i));
		}
		out.println(ans.size());
		for (String s: ans) {
			out.println(s);
		}
	}

	static int scanInt() throws IOException {
		return parseInt(scanString());
	}

	static long scanLong() throws IOException {
		return parseLong(scanString());
	}

	static String scanString() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	static BufferedReader in;
	static PrintWriter out;
	static StringTokenizer tok;

	public static void main(String[] args) {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			solve();
			in.close();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			exit(1);
		}
	}
}