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.util.StringTokenizer;
import java.lang.Math;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.StringBuilder;
import java.io.BufferedOutputStream;
import java.io.IOException;
public class CP2{
	static StringBuilder os = new StringBuilder();
	static long binpow(long num , long derajat){
		os.append(num + " ^ " + num + "\n");
		long res = 0;
		for (long i = 1 ; ; ){
			if ((i & derajat) != 0){
				os.append(res + " + " + num + "\n");
				res += num;
			}
			if ((i << 1) <= derajat){
				os.append(num + " + " + num + "\n");
				num <<= 1;
				i <<= 1;
			}
			else 
				break;
		}
		return res;
	}

	public static void main (String args[])throws IOException{
		FastScanner fs = new FastScanner();
		
		long x = fs.nextLong() , y = x;
		int last_bit = -1;
		for (long i = x ; i > 0 ; i >>= 1)
			++last_bit;
		for (int i = 0 ; i < last_bit ; ++i){
			os.append(y + " + " + y + "\n");
			y <<= 1;
		}
		
		os.append(y + " ^ " + x + "\n");
		y ^= x;
		
		//finding b , untuk menemukan by
		int b = 1;
		while(true){
			if (y * b % x == 1)
				break;
			else
				++b;
		}
		
		
		y = binpow(y , b);
		x = binpow(x , y / x);
		
		if (y % 2 == 0){
			os.append(y + " + " + x + "\n");
			os.append(x + " + " + x + "\n");
			y += x;
			x += x;
		}
		
		os.append(y + " ^ " + x + "\n");
		int cnt_newline = 0;
		for (int i = 0 ; i < os.length() ; ++i)
			if (os.charAt(i) == '\n')
				++cnt_newline;
		System.out.println(cnt_newline + "\n" + os);
	}
	static class FastScanner{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st;
		String next(){
			while (st == null || !st.hasMoreElements()){
				try{
					st = new StringTokenizer(br.readLine());
				}catch(IOException e){
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
		int nextInt(){
			return Integer.parseInt(next());
		}
		long nextLong(){
			return Long.parseLong(next());
		}
		double nextDouble(){
			return Double.parseDouble(next());
		}
		char nextChar(){
			return next().charAt(0);
		}	
		String nextLine(){
			String s = "";
			try{
				s = br.readLine();
			}catch(IOException e){
				e.printStackTrace();
			}
			return s;
		}
	}
}