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;
int n, k, a[1000005], x;
vector<pair<pair<long long, long long>, int> > v;
void add(long long x, long long y) {
  v.push_back(make_pair(pair<long long, long long>(x, y), 0));
}
void xr(long long x, long long y) {
  v.push_back(make_pair(pair<long long, long long>(x, y), 1));
}
void print() {
  printf("%d\n", (int)v.size());
  for (auto x : v) {
    if (x.second == 0)
      printf("%lld + %lld\n", x.first.first, x.first.second);
    else
      printf("%lld ^ %lld\n", x.first.first, x.first.second);
  }
}
int main() {
  scanf("%d", &x);
  int y;
  if (x % 4 == 3) {
    add(x, x);
    xr(x, x << 1);
    y = x ^ (x << 1);
  } else
    y = x;
  int p = 31 - __builtin_clz(y);
  long long tmp = y;
  for (int i = 0; i < p; i++) {
    add(tmp, tmp);
    tmp <<= 1;
  }
  long long l = (tmp ^ y), r = (tmp + y);
  assert(l ^ r == (1 << (p + 1)));
  add(tmp, y);
  xr(tmp, y);
  xr(l, r);
  long long m = -1;
  for (int i = 1; i <= x; i++)
    if ((1LL * i * (1 << (p + 1)) + 1) % x == 0) {
      m = i;
      break;
    }
  assert(m != -1);
  long long cur = (1LL << (p + 1));
  tmp = m;
  for (int i = 0; (1LL << i) < tmp; i++) {
    add(1LL * (1LL << i) * cur, 1LL * (1LL << i) * cur);
  }
  long long s = 0;
  for (int i = 0; (1LL << i) <= tmp; i++) {
    if (tmp & (1LL << i)) {
      if (s != 0) add(s, 1LL * (1 << i) * cur);
      s += 1LL * (1LL << i) * cur;
    }
  }
  cur = x, tmp = (1LL * m * (1 << (p + 1)) + 1) / x;
  for (int i = 0; (1LL << i) < tmp; i++) {
    add(1LL * (1 << i) * cur, 1LL * (1 << i) * cur);
  }
  s = 0;
  for (int i = 0; (1LL << i) <= tmp; i++) {
    if (tmp & (1LL << i)) {
      if (s != 0) add(s, 1LL * (1 << i) * cur);
      s += 1LL * (1LL << i) * cur;
    }
  }
  xr(1LL * m * (1LL << (p + 1)) + 1, 1LL * m * (1LL << (p + 1)));
  print();
  return 0;
}