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 MOD = 1000000007;
const long double EPS = 1e11;
const long long INFL = 1e16;
const int INF = 1e9 + 7;
mt19937 rnd((unsigned)chrono::steady_clock::now().time_since_epoch().count());
int highdig(long long x) {
  int ans = 0;
  while (x > 0LL) {
    x /= 2LL;
    ++ans;
  }
  return ans;
}
long long umen(long long x, vector<long long>& ea, vector<long long>& eb,
               vector<char>& ec) {
  long long cx = x;
  long long highdigx = 1;
  while (highdigx * 2LL <= x) {
    highdigx *= 2LL;
  }
  while (cx % highdigx != 0LL) {
    ea.push_back(cx);
    eb.push_back(cx);
    ec.push_back('+');
    cx *= 2LL;
  }
  ea.push_back(x);
  ea.push_back(x);
  eb.push_back(cx);
  eb.push_back(cx);
  ec.push_back('+');
  ec.push_back('^');
  long long y2 = cx + x;
  long long y3 = (cx ^ x);
  ea.push_back(y2);
  eb.push_back(y3);
  ec.push_back('^');
  cx = (y2 ^ y3);
  while (highdig(cx) > highdig(x)) {
    long long ccx = x;
    while (highdig(ccx) < highdig(cx)) {
      ea.push_back(ccx);
      eb.push_back(ccx);
      ec.push_back('+');
      ccx *= 2LL;
    }
    ea.push_back(cx);
    eb.push_back(ccx);
    ec.push_back('^');
    cx ^= ccx;
  }
  while (highdig(cx) < highdig(x)) {
    ea.push_back(cx);
    eb.push_back(cx);
    ec.push_back('+');
    cx *= 2LL;
  }
  ea.push_back(x);
  eb.push_back(cx);
  ec.push_back('^');
  while ((x ^ cx) % 2 == 0) {
    cx = cx;
  }
  return (x ^ cx);
}
long long trie(long long x, vector<long long>& ea, vector<long long>& eb,
               vector<char>& ec) {
  ea.push_back(x);
  eb.push_back(x);
  ec.push_back('+');
  long long y1 = x * 2LL;
  ea.push_back(x);
  eb.push_back(y1);
  ec.push_back('+');
  long long y2 = x + y1;
  ea.push_back(y1);
  eb.push_back(y1);
  ec.push_back('+');
  ea.push_back(y2);
  eb.push_back(y1 * 2LL);
  ec.push_back('^');
  long long y3 = (y2 ^ (2 * y1));
  ea.push_back(y2);
  eb.push_back(y3);
  ec.push_back('+');
  long long y4 = y2 + y3;
  ea.push_back(2 * y1);
  eb.push_back(y4);
  ec.push_back('^');
  for (long long cd = 2LL; x > 1LL; cd *= 2LL) {
    ea.push_back(x);
    eb.push_back(cd);
    ec.push_back('^');
    ea.push_back(cd);
    eb.push_back(cd);
    ec.push_back('+');
    x ^= cd;
  }
  return 1LL;
}
void solve() {
  long long x;
  cin >> x;
  vector<long long> ea, eb;
  vector<char> ec;
  while (x > 1LL) {
    if ((x & (x + 1LL)) > 0LL) {
      x = umen(x, ea, eb, ec);
    } else {
      x = trie(x, ea, eb, ec);
    }
  }
  cout << ea.size() << "\n";
  for (int i = 0; i < ea.size(); ++i) {
    cout << ea[i] << " " << ec[i] << " " << eb[i] << "\n";
  }
}
int main() {
  int t = 1;
  for (int i = 0; i < t; ++i) {
    solve();
  }
  return 0;
}