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;
int i, j, m, n, rev_dig[25], cnt, non_zero, anscnt;
long long x, ans1[100005], ans2[100005], ans3[100005];
long long getinv(long long a, long long p) {
  if (a == 1) return 1;
  long long k = a - getinv(p % a, a);
  return (k * p + 1) / a;
}
void answer(long long a, long long b, int ty) {
  anscnt++;
  ans1[anscnt] = a;
  ans2[anscnt] = b;
  ans3[anscnt] = ty;
}
void getmul(int t, long long x) {
  long long temp = 1;
  long long xx = x;
  while (temp < t) {
    answer(xx, xx, 1);
    xx <<= 1;
    temp <<= 1;
  }
  temp = 1;
  long long now = 0;
  while (temp <= t) {
    if (temp & t) {
      if (now > 0) {
        answer(temp * x, now, 1);
        now += temp * x;
      } else {
        now = temp * x;
      }
    }
    temp <<= 1;
  }
}
int main() {
  anscnt = 0;
  scanf("%lld", &x);
  if (x % 4 == 1) {
    answer(x, x, 1);
    answer(x, x * 2, 1);
    x *= 3;
  }
  cnt = 0;
  long long xx = x;
  while (xx > 0) {
    cnt++;
    rev_dig[cnt] = xx & 1;
    xx >>= 1;
  }
  non_zero = 0;
  for (i = 1; i <= cnt; i++) {
    if (rev_dig[i] == 0) {
      non_zero = i;
      break;
    }
  }
  if (non_zero == 0) {
    cnt++;
    rev_dig[cnt] = 0;
    non_zero = cnt;
  }
  long long xinv = getinv(x, 1 << cnt);
  long long r1 = x - 1;
  long long t1 = r1 * xinv % (1 << cnt);
  getmul(t1, x);
  long long b = t1 * x;
  answer(b, x, 2);
  long long c = b ^ x;
  answer(x, c, 1);
  long long d = (x + c);
  answer(b, d, 2);
  long long e = b ^ d;
  if (e != 2) {
    long long r2 = x - 2;
    long long t2 = r2 * xinv % (1 << cnt);
    getmul(t2, x);
    long long b2 = t2 * x;
    answer(b2, x, 2);
    long long c2 = b2 ^ x;
    answer(x, c2, 1);
    long long d2 = (x + c2);
    answer(b2, d2, 2);
    long long e2 = b2 ^ d2;
    answer(e, e2, 2);
  }
  e = 2;
  while (e <= x) {
    answer(e, e, 1);
    if (e & x) {
      answer(e, x, 2);
      x = e ^ x;
    }
    e <<= 1;
  }
  printf("%d\n", anscnt);
  for (i = 1; i <= anscnt; i++) {
    if (ans3[i] == 1) {
      printf("%lld + %lld\n", ans1[i], ans2[i]);
    } else {
      printf("%lld ^ %lld\n", ans1[i], ans2[i]);
    }
  }
  return 0;
}