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.*;
import java.io.*;
public class EdE {
	static long num = 998244353;
	public static void main(String[] args) throws Exception{
		

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
 		long n = Integer.parseInt(bf.readLine());
 		ArrayList<Answer> array = new ArrayList<Answer>();
 		long largesttwo = 1;
 		int count = 0;
 		while(largesttwo*2L <= n){
 			largesttwo*=2L;
 			count++;
 		}
 		long prod = 1;
 		for(int j =0 ;j<count;j++){
 			array.add(new Answer(true, n*prod, n*prod));
 			prod*=2;
 		}
 		array.add(new Answer(false, n, n*largesttwo));
 		
 		
 		long b = n^(n*largesttwo);
 		
 		long multipleb = 1;
 		while(!works(b*multipleb, n)){
 			multipleb++;
 		}
 		
 		long multiplen = 0;
 		if ((b*multipleb)%2 == 0){
 			multiplen = (b*multipleb+1)/n;
 		}
 		else{
 			multiplen = (b*multipleb-1)/n;
 		}
 		
 		
 		long largesttwob = 1;
 		int countb =0 ;
 		while(largesttwob*2L <= multipleb){
 			largesttwob*=2L;
 			countb++;
 		}
 		long prodb = 1;
 		for(int j =0 ;j<countb;j++){
 			array.add(new Answer(true, b*prodb, b*prodb));
 			prodb*=2L;
 		}
 		long largesttwon = 1;
 		int countn = 0;
 		while(largesttwon*2L <= multiplen){
 			largesttwon*=2L;
 			countn++;
 		}
 		long prodn = 1;
 		for(int j =0 ;j<countn;j++){
 			array.add(new Answer(true, n*prodn, n*prodn));
 			prodn*=2L;
 		}
 		
 		String ns = Long.toBinaryString(multiplen);
 		long prodns = 1L;
 		long currns = 0;
 		int index = ns.length()-1;
 		while(index >=0 && ns.charAt(index) == '0'){
 			index--;
 			prodns*=2L;
 		}
 		currns = n*prodns;
 		index--;
 		prodns*=2;
 		for(int j = index;j>=0;j--){
 			if (ns.charAt(j) == '1'){
 				array.add(new Answer(true, currns, n*prodns));
 				currns+=n*prodns;
 			}
 			prodns*=2L;
 		}
 		/**
 		 * 123
34
123 + 123
246 + 246
492 + 492
984 + 984
1968 + 1968
3936 + 3936
123 ^ 7872
7867 + 7867
15734 + 15734
31468 + 31468
62936 + 62936
125872 + 125872
123 + 123
246 + 246
492 + 492
984 + 984
1968 + 1968
3936 + 3936
7872 + 7872
15744 + 15744
31488 + 31488
62976 + 62976
125952 + 125952
246 + 492
738 + 984
1722 + 1968
3690 + 3936
7626 + 7872
15498 + 15744
31242 + 31488
62730 + 62976
125706 + 125952
251658 + 251904
385482 ^ 385483
 		 */
 		
 		String nb = Long.toBinaryString(multipleb);
 		long prodnb = 1L;
 		long currnb = 0;
 		int indexb = nb.length()-1;
 		while(indexb >=0 && nb.charAt(indexb) == '0'){
 			indexb--;
 			prodnb*=2L;
 		}
 		currnb = b*prodnb;
 		prodnb*=2L;
 		indexb--;
 		for(int j = indexb;j>=0;j--){
 			if (nb.charAt(j) == '1'){
 				array.add(new Answer(true, currnb, b*prodnb));
 				currnb+=b*prodnb;
 			}
 			prodnb*=2L;
 		}
 		array.add(new Answer(false, n*multiplen, b*multipleb));
 		out.println(array.size());
 		for(Answer j : array){
 			if (j.isAdd)
 				out.println(j.a + " + " + j.b);
 			else
 				out.println(j.a + " ^ " + j.b);
 		}
 		
 		
 		
 		
 		
 		
 		
 		
 		out.println();
	 		
 		out.close();
 		
 		
 		
 	}
	static class Answer{
		private boolean isAdd;
		private long a;
		private long b;
		public Answer(boolean isAdd, long a, long b){
			this.isAdd = isAdd;
			this.a = a;
			this.b = b;
		}
	}
	public static boolean works(long b, long n){
		if (b%2 == 0){
			if ((b+1)%n == 0)
				return true;
			else
				return false;
		}
		else{
			if (b%n == 1)
				return true;
			else
				return false;
		}
	}
}
 	
 
//StringJoiner sj = new StringJoiner(" "); 
//sj.add(strings)
//sj.toString() gives string of those stuff w spaces or whatever that sequence is