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>
template <class T = int>
T gcd(T a, T b) {
  if (b == 0) {
    return (a < 0 ? -a : a);
  }
  return gcd(b, a % b);
}
class Random {
  std::mt19937 rng;

 public:
  Random() : rng(std::chrono::steady_clock::now().time_since_epoch().count()) {}
  void nextBytes(unsigned char *data, int amount) {
    std::uniform_int_distribution<short> uid(0, 255);
    for (int i = 0; i < amount; i++) {
      data[i] = uid(rng);
    }
  }
  template <class T = int>
  T nextInt(T min, T max) {
    std::uniform_int_distribution<T> uid(min, max);
    return uid(rng);
  }
  template <class T = int>
  T nextInt(T max) {
    return nextInt(0, max);
  }
  template <class T = int>
  T nextInt() {
    return nextInt(std::numeric_limits<T>::min(),
                   std::numeric_limits<T>::max());
  }
  template <class T = double>
  T nextFloat() {
    std::uniform_real_distribution<T> urd(0.0, std::nexttoward((T)1.0, 0.0));
    return urd(rng);
  }
  template <class RandomAccessIterator>
  void shuffle(RandomAccessIterator begin, RandomAccessIterator end) {
    std::shuffle(begin, end, rng);
  }
};
struct Op {
  long long a, b;
  int op;
};
Random rng;
int n;
std::vector<Op> ans;
std::set<long long> seen;
void writeAns(long long a, long long b, int op) {
  if (a == 0 || b == 0) return;
  if (op == 0) {
    if (!seen.insert(a + b).second) return;
  }
  if (op == 1) {
    if (!seen.insert(a ^ b).second) return;
  }
  ans.push_back({a, b, op});
}
std::pair<long long, long long> findPair(long long v1, long long v2) {
  long long cv1 = v1;
  long long cv2 = v2;
  long long c1 = 1;
  long long c2 = 1;
  while (cv1 != cv2 + 1) {
    if (cv1 <= cv2) {
      long long add = (cv2 - cv1 + v1 - 1) / v1;
      cv1 += v1 * add;
      c1 += add;
    } else {
      cv2 += v2;
      c2++;
    }
  }
  return {c1, c2};
}
long long findMul(long long v) {
  for (int i = 0; i < 100000; i++) {
    long long mul1 = v;
    long long mul2 = rng.nextInt<int>(1, v);
    long long v1 = v * mul1;
    long long v2 = v * mul2;
    long long x = v1 ^ v2;
    if (gcd(v, x) == 1) return mul2;
  }
  assert(false);
}
void writeInit(long long n, long long end) {
  for (long long i = n; i <= end; i *= 2) {
    writeAns(i, i, 0);
  }
}
void writeMul(long long init, long long mul) {
  long long initMul = mul;
  long long add = init;
  long long v = 0;
  while (mul) {
    if (mul & 1) {
      writeAns(v, add, 0);
      v += add;
    }
    add *= 2;
    mul /= 2;
  }
  assert(v == init * initMul);
}
int main() {
  scanf("%d", &n);
  writeInit(n, (long long)n * n * n);
  long long mul = findMul(n);
  writeMul(n, mul);
  writeMul(n, n);
  writeAns((long long)n * n, n * mul, 1);
  long long v1 = (long long)n * n;
  long long v2 = n * mul;
  long long v3 = v1 ^ v2;
  auto p = findPair(n, v3);
  writeInit(v3, v3 * p.second);
  writeMul(n, p.first);
  writeMul(v3, p.second);
  long long v4 = n * p.first;
  long long v5 = v3 * p.second;
  if (v4 % 2 == 0) {
    writeAns(v4, n, 0);
    writeAns(v5, n, 0);
    v4 += n;
    v5 += n;
  }
  writeAns(v4, v5, 1);
  printf("%d\n", ans.size());
  for (auto &a : ans) {
    printf("%I64d %c %I64d\n", a.a, a.op == 0 ? '+' : '^', a.b);
  }
  return 0;
}