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>
std::set<long long> Set;
const long long maxn = 4e18;
long long S[1000005], BIT[64], cnt;
long long read() {
  char c = getchar();
  long long ans = 0;
  bool flag = true;
  while (c < '0' || c > '9') flag &= (c != '-'), c = getchar();
  while (c >= '0' && c <= '9') ans = ans * 10 + c - '0', c = getchar();
  return flag ? ans : -ans;
}
void Write(long long x) {
  if (x < 10)
    putchar(x + '0');
  else
    Write(x / 10), putchar(x % 10 + '0');
}
long long min(long long x, long long y) { return x < y ? x : y; }
long long max(long long x, long long y) { return x > y ? x : y; }
struct oper {
  long long op, x, y;
};
std::vector<oper> ans;
long long Answer(long long OP, long long X, long long Y) {
  assert(Set.find(X) != Set.end()), assert(Set.find(Y) != Set.end());
  long long Z = (OP == 0 ? X + Y : X ^ Y);
  if (Set.find(Z) == Set.end())
    ans.push_back((oper){OP, X, Y}), Set.insert(Z), S[++cnt] = Z;
  return Z;
}
bool Insert(long long x) {
  long long tmp = x;
  for (long long i = 62; i >= 0; i--) {
    if (!(x >> i & 1)) continue;
    if (!BIT[i]) {
      x = tmp;
      for (long long j = 62; j >= i; j--)
        if (BIT[j] && (x >> j & 1)) Answer(1, x, BIT[j]), x ^= BIT[j];
      BIT[i] = x;
      return true;
    } else
      x ^= BIT[i];
  }
  return false;
}
void calc(long long x) {
  Set.insert(x), S[1] = x;
  cnt = 1;
  Insert(x);
  long long tmp = x;
  while (tmp * 2 <= maxn) Answer(0, tmp, tmp), Insert(tmp * 2), tmp *= 2;
  while (cnt <= 99000 && !BIT[0]) {
    long long x = S[rand() % cnt + 1], y = S[rand() % cnt + 1];
    bool flag = true;
    if (x + y > maxn) continue;
    Answer(0, x, y);
    Insert(x + y);
  }
  long long CNT = 0;
  for (long long i = 0; i <= 62; i++) CNT += !!S[i];
}
int main() {
  Set.clear(), cnt = 0, memset(BIT, 0, sizeof(BIT)), ans.clear();
  calc(read());
  assert(Set.find(1) != Set.end());
  Write(ans.size()), putchar('\n');
  for (auto i : ans)
    Write(i.x), putchar(' '), putchar(i.op ? '^' : '+'), putchar(' '),
        Write(i.y), putchar('\n');
  return 0;
}