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 int MOD = 1e9 + 7;
const int C = 26;
void add(int& x, int y) {
  x += y;
  while (x >= MOD) x -= MOD;
  while (x < 0) x += MOD;
}
int fix(int x) {
  while (x >= MOD) x -= MOD;
  while (x < 0) x += MOD;
  return x;
}
int pw(int a, int b) {
  int ret = 1;
  while (b) {
    if (b & 1) ret = 1ll * ret * a % MOD;
    b >>= 1;
    a = 1ll * a * a % MOD;
  }
  return ret;
}
const int MAXN = 1e5 + 10;
struct OP {
  long long a, b;
  char ch;
  void pr() { cout << a << " " << ch << " " << b << "\n"; }
} ops[MAXN];
int x, n, m;
long long have[MAXN];
long long make(long long a, long long b, char ch) {
  ops[n++] = {a, b, ch};
  if (ch == '^') {
    have[m++] = a ^ b;
  } else {
    have[m++] = a + b;
  }
  return have[m - 1];
}
long long basis[60], sz;
void insert(long long xx, vector<OP>& now) {
  bool ok = false;
  for (int b = 59; ~b; --b) {
    if (xx >> b & 1) {
      if (!basis[b]) {
        basis[b] = xx;
        ++sz;
        ok = true;
      }
      now.push_back({xx, basis[b], '^'});
      xx ^= basis[b];
    }
  }
  if (!ok) {
    now.clear();
    for (OP& op : now) make(op.a, op.b, op.ch);
  }
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int r(int a, int b) { return a + rng() % (b - a + 1); }
void solve(bool codeforces = true) {
  memset(basis, 0, sizeof basis);
  n = m = sz = 0;
  if (codeforces) cin >> x;
  vector<OP> now;
  insert(x, now);
  have[m++] = x;
  make(x, x, '+');
  set<array<int, 3>> seen;
  while (!basis[0]) {
    int a, b;
    a = r(0, m - 1);
    b = r(0, m - 1);
    if (a > b) {
      swap(a, b);
    }
    char ch = "^+"[r(1, 100) <= 60];
    if (seen.count({a, b, ch})) continue;
    long long y = ch == '+' ? have[a] + have[b] : (have[a] ^ have[b]);
    if (y >= (1LL << 60)) continue;
    if (!have[a] || !have[b]) continue;
    now.clear();
    insert(y, now);
    if (!now.empty()) {
      make(have[a], have[b], ch);
      for (OP& op : now) make(op.a, op.b, op.ch);
    }
    seen.insert({a, b, ch});
  }
  cerr << n << "\n";
  cout << n << "\n";
  for (int i = 0; i < n; i++) {
    ops[i].pr();
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int te = 1;
  solve();
  return 0;
}