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 MX = (long long)5e18;
struct Basis {
  vector<long long> b;
  vector<long long> mask;
  void add(long long v, long long cmask) {
    for (size_t i = 0; i < b.size(); i++) {
      if (!v) break;
      int l = __builtin_clzll(v), r = __builtin_clzll(b[i]);
      if (l < r) {
        mask.insert(mask.begin() + i, cmask);
        b.insert(b.begin() + i, v);
        return;
      }
      if (l == r) {
        cmask ^= mask[i];
        v ^= b[i];
      }
    }
    if (v) {
      b.push_back(v);
      mask.push_back(cmask);
    }
  }
  bool can(long long v) {
    for (size_t i = 0; i < b.size(); i++) {
      if (!v) break;
      int l = __builtin_clzll(v), r = __builtin_clzll(b[i]);
      if (l < r) {
        return false;
      }
      if (l == r) v ^= b[i];
    }
    return !v;
  }
  long long restore(long long v) {
    long long ans = 0;
    for (size_t i = 0; i < b.size(); i++) {
      if (!v) break;
      int l = __builtin_clzll(v), r = __builtin_clzll(b[i]);
      if (l == r) {
        ans ^= mask[i];
        v ^= b[i];
      }
    }
    return ans;
  }
};
void solve() {
  long long x;
  cin >> x;
  vector<pair<long long, long long> > args;
  vector<char> ops;
  args.emplace_back(x, x);
  ops.push_back('^');
  while (x > 1) {
    for (unsigned long long i = 2 * x; i < (unsigned long long)MX; i *= 2) {
      args.emplace_back(i / 2, i / 2);
      ops.push_back('+');
    }
    Basis b;
    vector<long long> base;
    int len = 64 - __builtin_clzll(x);
    for (long long i = 2 * x; i < MX; i += 2 * x) {
      if (!b.can(i >> (len - 1))) {
        b.add(i >> (len - 1), 1ll << base.size());
        base.push_back(i);
      }
      if (b.can(1)) break;
    }
    auto mask = b.restore(1);
    long long p = x;
    for (size_t i = 0; i < base.size(); i++) {
      if (mask & (1ll << i)) {
        long long lol = base[i] / p;
        int bit = 0;
        long long got = 0;
        while (lol) {
          if (lol & 1) {
            args.emplace_back(got, p * (1ll << bit));
            ops.push_back('+');
            got += p * (1ll << bit);
          }
          ++bit;
          lol >>= 1;
        }
        args.emplace_back(x, base[i]);
        ops.push_back('^');
        x ^= base[i];
      }
    }
    assert(__builtin_clzll(x) > __builtin_clzll(p));
  }
  cout << args.size() << endl;
  for (size_t i = 0; i < args.size(); i++) {
    cout << args[i].first << ' ' << ops[i] << ' ' << args[i].second << '\n';
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(9);
  int T = 1;
  while (T--) solve();
  return 0;
}