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;
long long t, n, m, k, ccnt, pos = 0, sum = 0, minn2 = INT_MAX, sum2, cnt2 = 0,
                            cnt3 = 0, cnt4 = 0, cnt5 = 0, cnt6 = 0, cnt7 = 0,
                            vis[100005], x1, y7, x2, y2, x3, y3, aaa, bbb;
long long a[1000005], b[1000005], c[1000005], c2[1000005], c3[1000005],
    c4[1000005], kk[1000005], cnt = 0, x, y, z, d = 0, minn = LONG_LONG_MAX,
                              maxx = -LONG_LONG_MAX;
long long pos1 = 3, pos2 = 3, tem, tem2, l, r, ans = 0, ans2, mod = 1000000007,
          tw[105], th[105], dd, ee, out[1000005];
string s1, s2, s;
char cc[1005][1005], ch;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  tw[0] = 1;
  for (int i = 1; i <= 40; i++) {
    tw[i] = tw[i - 1] * 2;
  }
  cin >> n;
  cnt5 = 0;
  for (int i = 0;; i++) {
    if (tw[i] >= n) {
      pos = i;
      break;
    }
  }
  for (int i = 0; i < 40; i++) {
    a[cnt5] = n * tw[i];
    b[cnt5] = 1;
    c[cnt5] = n * tw[i];
    cnt5++;
  }
  a[cnt5] = n;
  b[cnt5] = 2;
  c[cnt5] = n * tw[pos - 1];
  x = a[cnt5] ^ c[cnt5];
  cnt5++;
  for (int i = 0; i <= 22; i++) {
    a[cnt5] = x * tw[i];
    b[cnt5] = 1;
    c[cnt5] = x * tw[i];
    cnt5++;
  }
  for (int i = 1; i <= 2 * n; i++) {
    if ((x * i) % (2 * n) == 1) {
      pos1 = i;
      pos2 = (x * i - 1) / (2 * n);
      aaa = x * i;
      bbb = x * i - 1;
    }
  }
  d = 0;
  for (int i = 24; i >= 0; i--) {
    if (pos1 >= tw[i]) {
      if (d == 0) {
        d = 1;
        ans = x * tw[i];
      } else {
        a[cnt5] = ans;
        b[cnt5] = 1;
        c[cnt5] = x * tw[i];
        cnt5++;
        ans = ans + x * tw[i];
      }
      pos1 = pos1 - tw[i];
    }
  }
  ans = 0;
  d = 0;
  for (int i = 40; i >= 0; i--) {
    if (pos2 >= tw[i]) {
      if (d == 0) {
        d = 1;
        ans = 2 * n * tw[i];
      } else {
        a[cnt5] = ans;
        b[cnt5] = 1;
        c[cnt5] = 2 * n * tw[i];
        cnt5++;
        ans = ans + 2 * n * tw[i];
      }
      pos2 = pos2 - tw[i];
    }
  }
  a[cnt5] = aaa;
  b[cnt5] = 2;
  c[cnt5] = bbb;
  cnt5++;
  cout << cnt5 << '\n';
  for (int i = 0; i < cnt5; i++) {
    cout << a[i] << " ";
    if (b[i] == 1) {
      cout << "+ ";
    } else {
      cout << "^ ";
    }
    cout << c[i] << '\n';
  }
}