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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
mt19937 rng(58);
uniform_int_distribution<long long> dist(1, 1LL << 20);
long long x;
pair<long long, long long> rem[2000005];
vector<tuple<long long, char, long long> > operations;
void gen2(long long k) {
  long long temp = 0;
  for (int i = 0; i < 21; i++) {
    if (k & (1LL << i)) {
      if (temp != 0) {
        operations.push_back(
            tuple<long long, char, long long>(temp * x, '+', (x << i)));
      }
      temp += (1LL << i);
    }
  }
}
void gen(long long a, long long b, long long c, long long d) {
  for (int i = 0; i < 20; i++) {
    operations.push_back(
        tuple<long long, char, long long>((x << i), '+', (x << i)));
  }
  gen2(a);
  gen2(b);
  gen2(c);
  gen2(d);
  operations.push_back(tuple<long long, char, long long>(a * x, '^', b * x));
  operations.push_back(tuple<long long, char, long long>(c * x, '^', d * x));
  long long temp1 = (a * x) ^ (b * x);
  long long temp2 = (c * x) ^ (d * x);
  long long diff = (abs(temp1 - temp2) + 1) / x * x;
  gen2(diff / x);
  operations.push_back(
      tuple<long long, char, long long>(min(temp1, temp2), '+', diff));
  operations.push_back(tuple<long long, char, long long>(
      min(temp1, temp2) + diff, '^', max(temp1, temp2)));
}
int main() {
  scanf("%lld", &x);
  for (int i = 0; i < 2 * x; i++) {
    rem[i] = pair<long long, long long>(-1, -1);
  }
  bool success = false;
  while (true) {
    long long a = dist(rng);
    long long b = dist(rng);
    long long r = ((a * x) ^ (b * x)) % (2 * x);
    rem[r] = pair<long long, long long>(a, b);
    if (rem[r ^ 1] != pair<long long, long long>(-1, -1)) {
      long long c, d;
      tie(c, d) = rem[r ^ 1];
      gen(a, b, c, d);
      success = true;
      break;
    }
  }
  printf("%d\n", (int)operations.size());
  for (tuple<long long, char, long long> k : operations) {
    long long w, y;
    char z;
    tie(w, z, y) = k;
    printf("%lld %c %lld\n", w, z, y);
  }
  return 0;
}