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;
template <class T>
constexpr T inf = numeric_limits<T>::has_infinity
                      ? numeric_limits<T>::infinity()
                      : (numeric_limits<T>::max() / 2);
int __inf_ignore() {
  int t = inf<int>;
  return t;
}
const string nl = "\n";
struct S {
  long long a, b;
  char op;
  S(long long a, long long b, char op) : a(a), op(op), b(b) {}
};
vector<S> mul(long long n, long long p) {
  vector<S> ret;
  long long s = 0;
  long long p0 = p;
  long long n0 = n;
  long long q = 1;
  while (p > 0) {
    if (p & q) {
      if (s > 0) {
        ret.push_back(S(s, n, '+'));
      }
      s += n;
      p ^= q;
    }
    q <<= 1;
    ret.push_back(S(n, n, '+'));
    n *= 2;
  }
  assert(s == n0 * p0);
  return ret;
}
pair<vector<S>, long long> reduce(long long n, long long p) {
  vector<S> ret;
  long long m = n * p;
  auto v = mul(n, p);
  ret.insert(ret.end(), (v).begin(), (v).end());
  int d = 62;
  while (!(n & (1ll << d))) d--;
  for (int i = 62; i >= d; i--) {
    if (m & (1ll << i)) {
      auto v = mul(n, (1 << (i - d)));
      ret.insert(ret.end(), (v).begin(), (v).end());
      ret.push_back(S(m, n << (i - d), '^'));
      m ^= (n << (i - d));
    }
    assert(!(m & (1ll << i)));
  }
  return {ret, m};
}
pair<vector<S>, long long> mod_like(long long n, long long m) {
  assert(n % 2 == 1);
  assert(m % 2 == 0);
  vector<S> ret;
  long long d = 62;
  while (!(m & (1ll << d))) d--;
  for (int i = 62; i >= d; i--) {
    if (n & (1ll << i)) {
      auto v = mul(m, 1 << (i - d));
      ret.insert(ret.end(), (v).begin(), (v).end());
      ret.push_back(S(n, m << (i - d), '^'));
      n ^= (m << (i - d));
    }
    assert(!(n & (1ll << i)));
  }
  return {ret, n};
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<S> ans;
  long long n;
  cin >> n;
  while (n != 1) {
    for (long long p = 3;; p += 2) {
      auto t = reduce(n, p);
      long long m = t.second;
      if (m == 0) continue;
      ans.insert(ans.end(), (t.first).begin(), (t.first).end());
      if (m % 2 == 0) {
        auto t = mod_like(n, m);
        m = t.second;
        ans.insert(ans.end(), (t.first).begin(), (t.first).end());
      }
      n = m;
      break;
    }
  }
  ans.emplace_back(1, 1, '^');
  ans.emplace_back(0, 1, '^');
  cout << ans.size() << endl;
  for (auto &&s : ans) {
    cout << s.a << " " << s.op << " " << s.b << endl;
  }
  return 0;
}