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;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
struct point {
  int ck;
  long long a, b;
};
vector<point> R;
void Make(long long a, long long b) {
  int i;
  for (i = 0; (1ll << i) < b; i++) {
    R.push_back({1, a << i, a << i});
  }
  long long bef = 0;
  for (i = 0; i < 60; i++) {
    if ((b >> i) & 1) {
      if (bef == 0) {
        bef = (a << i);
      } else {
        R.push_back({1, bef, a << i});
        bef += (a << i);
      }
    }
  }
}
pair<long long, long long> Get(long long a, long long b) {
  if (a == 0) return {0, 1};
  if (b == 0) return {1, 0};
  long long q = a / b, r = a % b;
  pair<long long, long long> tp = Get(b, a % b);
  return {tp.second, tp.first - q * tp.second};
}
void Do(long long a, long long b) {
  if (a > b) swap(a, b);
  pair<long long, long long> t = Get(a, b);
  long long X = t.first, Y = t.second;
  X = abs(X), Y = abs(Y);
  Make(a, X);
  Make(b, Y);
  long long ta = a * X, tb = b * Y;
  int i;
  for (i = 0;; i++) {
    if ((((a * i) + ta) ^ ((a * i) + tb)) == abs(ta - tb)) {
      if (i) {
        Make(a, i);
        R.push_back({1, ta, a * i});
        R.push_back({1, tb, a * i});
      }
      R.push_back({2, ta + a * i, tb + a * i});
      return;
    }
  }
}
void Go(long long Z) {
  if (Z == 1) return;
  for (int i = 2;; i++) {
    long long t = Z ^ (i * Z);
    if (gcd(t, Z) != Z) {
      Make(Z, i);
      R.push_back({2, i * Z, Z});
      Do(t, Z);
      Go(gcd(t, Z));
      return;
    }
  }
}
void Solve() {
  int n;
  scanf("%d", &n);
  Go(n);
  printf("%d\n", R.size());
  for (auto &t : R) {
    if (t.ck == 1) {
      printf("%lld + %lld\n", t.a, t.b);
    } else {
      printf("%lld ^ %lld\n", t.a, t.b);
    }
  }
}
int main() {
  int TC = 1;
  while (TC--) {
    Solve();
  }
}