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 <typename T>
void read(T &x) {
  x = 0;
  bool f = 0;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = 1;
  for (; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48);
  if (f) x = -x;
}
template <typename F>
inline void write(F x, char ed = '\n') {
  static short st[30];
  short tp = 0;
  if (x < 0) putchar('-'), x = -x;
  do st[++tp] = x % 10, x /= 10;
  while (x);
  while (tp) putchar('0' | st[tp--]);
  putchar(ed);
}
template <typename T>
inline void Mx(T &x, T y) {
  x < y && (x = y);
}
template <typename T>
inline void Mn(T &x, T y) {
  x > y && (x = y);
}
const long long inf = 1ll << 60;
const int N = 200050;
long long ans[N][3], q;
set<long long> s;
long long a[N], bit[N], n;
inline bool oper(long long x, long long y, bool op) {
  if (x + y >= inf) return 0;
  long long t = op ? (x ^ y) : (x + y);
  if (s.find(t) != s.end()) return 0;
  s.insert(t);
  a[++n] = t;
  ans[++q][0] = x, ans[q][1] = y, ans[q][2] = op;
  return 1;
}
bool chk(long long x) {
  for (int i = 60; i >= 0; i--) {
    if (x >> i & 1) {
      if (bit[i])
        x ^= bit[i];
      else
        return 1;
    }
  }
  return 0;
}
void insert(long long x) {
  for (int i = 60; i >= 0; i--) {
    if (x >> i & 1) {
      if (bit[i])
        oper(bit[i], x, 1), x ^= bit[i];
      else {
        bit[i] = x;
        break;
      }
    }
  }
}
int main() {
  srand((long long)new char);
  read(a[1]), s.insert(a[1]), insert(a[1]), n = 1;
  for (int i = 2; i <= 20; i++)
    if (oper(a[n], a[n], 0) && chk(a[n])) insert(a[n]);
  while (s.find(1) == s.end()) {
    int x = rand() % n + 1, y = rand() % n + 1;
    if (oper(a[x], a[y], 0) && chk(a[n])) insert(a[n]);
  }
  write(q);
  for (int i = 1; i <= q; i++)
    write(ans[i][0], ' '), putchar(ans[i][2] ? '^' : '+'), putchar(' '),
        write(ans[i][1]);
  return 0;
}