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;
const long long INF = 1e18;
const int N = 100010;
int tot = 0;
long long a[N];
map<long long, int> mp;
long long basis[100];
vector<array<long long, 3> > ans;
void show_ans() {
  printf("%d\n", (int)ans.size());
  for (auto x : ans) {
    printf("%lld %c %lld\n", x[0], (x[2] ? '^' : '+'), x[1]);
  }
}
int add(long long x) {
  a[++tot] = x;
  mp[x] = tot;
  return tot;
}
void maintain_basis(long long num) {
  int pos = -1;
  long long x = num;
  for (int j = 62; j >= 0; --j) {
    if (((x >> j) & 1) == 0) continue;
    if (basis[j] == 0) {
      pos = j;
      break;
    }
    x ^= basis[j];
  }
  if (pos == -1) return;
  x = num;
  for (int j = 62; j >= 0; --j) {
    if (((x >> j) & 1) == 0) continue;
    if (basis[j] == 0) {
      basis[j] = x;
      break;
    }
    ans.push_back({x, basis[j], 1});
    add(x ^ basis[j]);
    x ^= basis[j];
  }
}
int rand_add(int x, int y, int op) {
  if (x == -1) x = rand() % tot + 1;
  if (y == -1) y = rand() % tot + 1;
  if (INF - a[x] < a[y]) return -1;
  if (op < 0 || op > 1) op = rand() % 2;
  long long res = op ? a[x] ^ a[y] : a[x] + a[y];
  int pos = mp[res];
  if (pos != 0) return pos;
  ans.push_back({a[x], a[y], op});
  pos = add(res);
  maintain_basis(res);
  return pos;
}
void solve(long long n) {
  ans.clear();
  tot = 0;
  memset(a, 0, sizeof(a[0]) * (tot + 3));
  mp.clear();
  memset(basis, 0, sizeof(basis));
  mp[0] = true;
  add(n);
  maintain_basis(n);
  int last = 1;
  for (int k = 1; k <= 64; ++k) {
    last = rand_add(last, 1, 0);
    if (basis[0] != 0) break;
  }
  last = 1;
  for (int k = 1; k <= 64; ++k) {
    last = rand_add(last, last, 0);
    if (basis[0] != 0) break;
  }
  int round = 0;
  while (basis[0] == 0) {
    round++;
    rand_add(-1, -1, -1);
  }
  if (0) {
    printf("%lld: round=%d tot=%d op=%zu\n", n, round, tot, ans.size());
  } else {
    show_ans();
  }
}
int main() {
  if (0) {
    srand((unsigned)time(NULL));
    for (int i = 1; i <= 25; ++i) {
      for (int j = 1; j < 8; j += 2) {
        solve((1LL << i) + j);
        long long r = rand() % (1LL << (i / 2));
        solve((1LL << i) + r * 2 + 1);
      }
    }
  } else {
    long long n;
    scanf("%lld", &n);
    if (n % 2 == 0) {
      puts("invalid");
      return 0;
    }
    solve(n);
  }
  return 0;
}