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 = 2e18;
const long long fact_table = 3200008;
priority_queue<long long> pql;
priority_queue<pair<long long, long long>> pqp;
priority_queue<long long, vector<long long>, greater<long long>> pqls;
priority_queue<pair<long long, long long>, vector<pair<long long, long long>>,
               greater<pair<long long, long long>>>
    pqps;
long long dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
long long dy[8] = {0, 1, 0, -1, 1, -1, -1, 1};
const long long mod = 1000000007ll;
long long mypow(long long a, long long b, long long m = mod) {
  long long x = 1;
  while (b) {
    while (!(b & 1)) {
      (a *= a) %= m;
      b >>= 1;
    }
    (x *= a) %= m;
    b--;
  }
  return x;
}
vector<long long> readvec(long long read) {
  vector<long long> res(read);
  for (int i = 0; i < read; i++) {
    cin >> res[i];
  }
  return res;
}
void YES(bool cond) {
  if (cond) {
    cout << "YES" << endl;
    ;
  } else {
    cout << "NO" << endl;
    ;
  }
  return;
}
void Yes(bool cond) {
  if (cond) {
    cout << "Yes" << endl;
    ;
  } else {
    cout << "No" << endl;
    ;
  }
  return;
}
void line() {
  cout << "--------------------" << endl;
  ;
  return;
}
bool multicase = false;
struct SegmentTree {
 private:
  long long n;
  vector<long long> node;

 public:
  SegmentTree(vector<long long> v) {
    long long sz = v.size();
    n = 1;
    while (n < sz) n *= 2;
    node.resize(2 * n - 1, -INF);
    for (int i = 0; i < sz; i++) node[i + n - 1] = v[i];
    for (int i = n - 2; i >= 0; i--)
      node[i] = max(node[2 * i + 1], node[2 * i + 2]);
  }
  void update(long long x, long long val) {
    x += (n - 1);
    node[x] = val;
    while (x > 0) {
      x = (x - 1) / 2;
      node[x] = max(node[2 * x + 1], node[2 * x + 2]);
    }
  }
  long long getmax(int a, int b, int k = 0, int l = 0, int r = -1) {
    if (r < 0) r = n;
    if (r <= a || b <= l) return -INF;
    if (a <= l && r <= b) return node[k];
    long long vl = getmax(a, b, 2 * k + 1, l, (l + r) / 2);
    long long vr = getmax(a, b, 2 * k + 2, (l + r) / 2, r);
    return max(vl, vr);
  }
};
long long n;
long long p[100];
long long q = 0;
long long x[100005], y[100005], z[100005];
long long add(long long n, long long m) {
  x[q] = n, y[q] = m;
  z[q] = 1;
  q++;
  return n + m;
}
long long xx(long long n, long long m) {
  x[q] = n, y[q] = m;
  z[q] = 0;
  q++;
  return n ^ m;
}
long long bit(long long n) {
  for (int i = 60; i >= 0; i--) {
    if ((n >> i) & 1ll) return i;
  }
  return -1;
}
void calc(long long n) {
  long long shift = 0;
  for (int j = 60; j >= 0; j--) {
    if (1ll << j & n) {
      shift = j;
      break;
    }
  }
  long long a = n;
  for (int i = 0; i < shift; i++) {
    a = add(a, a);
  }
  long long m = xx(a, n);
  long long k = add(a, n);
  long long s = xx(m, k);
  while (true) {
    long long b1 = bit(m);
    long long b2 = bit(s);
    long long kk = s;
    if (b2 - b1 > 0) break;
    for (int i = 0; i < b1 - b2; i++) {
      kk = add(kk, kk);
    }
    m = xx(m, kk);
  }
  if (m == 1) return;
  calc(m);
}
void solve() {
  cin >> n;
  if (n % 4 == 3) {
    long long m = add(n, n);
    long long k = xx(m, n);
    n = k;
  }
  calc(n);
  cout << q << endl;
  ;
  for (int i = 0; i < q; i++) {
    if (z[i] == 1) {
      cout << x[i] << " ";
      ;
      cout << '+' << " ";
      ;
      cout << y[i] << endl;
      ;
    } else {
      cout << x[i] << " ";
      ;
      cout << '^' << " ";
      ;
      cout << y[i] << endl;
      ;
    }
  }
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long q, testcase = 1;
  if (multicase) {
    cin >> q;
  } else {
    q = 1;
  }
  while (q--) {
    solve();
    testcase++;
  }
  return 0;
}