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 std::random_shuffle;
using std::vector;
const long long N = 100;
long long cnt, a[N];
vector<long long> V;
inline void init() {
  memset(a, 0, sizeof(a));
  cnt = 0;
  return;
}
inline long long expand(long long x) {
  register long long i;
  for (i = 49; i >= 0; i--)
    if (x >> i & 1) {
      if (!a[i]) return a[i] = x, 1;
      V.push_back(a[i]);
      V.push_back(-2);
      V.push_back(x);
      V.push_back(-3);
      x ^= a[i];
    }
  return 0;
}
inline long long rand1() {
  long long res = 0, x, y;
  register long long i;
  for (x = 0, i = 40; i >= 0; i--)
    if (a[i] && (rand() & 1)) {
      V.push_back(a[i]);
      V.push_back(-2);
      V.push_back(x);
      V.push_back(-3);
      x ^= a[i];
    }
  res += x;
  for (y = 0, i = 40; i >= 0; i--)
    if (a[i] && (rand() & 1)) {
      V.push_back(a[i]);
      V.push_back(-2);
      V.push_back(y);
      V.push_back(-3);
      y ^= a[i];
    }
  res += y;
  V.push_back(x);
  V.push_back(-1);
  V.push_back(y);
  V.push_back(-3);
  return res;
}
inline bool check(long long x) {
  register long long i;
  init();
  V.clear();
  expand(x);
  V.push_back(x);
  V.push_back(-2);
  V.push_back(x);
  V.push_back(-3);
  for (i = 2; !a[0] && i <= 1000; i++) {
    V.push_back((i - 1) * x);
    V.push_back(-1);
    V.push_back(x);
    V.push_back(-3);
    expand(i * x);
    expand(rand1());
  }
  printf("%d\n", (long long)V.size() / 4);
  for (long long x : V) switch (x) {
      case -1:
        printf(" + ");
        break;
      case -2:
        printf(" ^ ");
        break;
      case -3:
        printf("\n");
        break;
      default:
        printf("%lld", x);
        break;
    }
  for (long long x : V)
    if (x > (1e14)) return 0;
  return a[0];
}
signed main() {
  long long x;
  scanf("%lld", &x);
  check(x);
  return 0;
}