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>
#pragma warning(disable : 4996)
template <typename T>
T min(T x, T y) {
  return x < y ? x : y;
}
template <typename T>
T max(T x, T y) {
  return x > y ? x : y;
};
const long long INF = 20000000050000;
const long long mod = 998244353;
const long long MAXN = 100005;
long long mabs(long long x) { return x > 0 ? x : -x; }
int Q;
std::pair<long long, long long> ans[MAXN];
char opt[MAXN];
long long tmp[MAXN];
int sz;
void push(long long x, long long y, char op) {
  ans[++Q] = {x, y};
  opt[Q] = op;
  tmp[++sz] = op == '+' ? x + y : x ^ y;
}
int highbit(long long x) {
  int h = 60;
  while (!((x >> h) & 1)) h--;
  return h;
}
void write(long long x, long long n) {
  int L = highbit(n);
  tmp[++sz] = x;
  int t = sz;
  long long y = n & 1 ? x : 0;
  for (int i = 1; i <= L; i++) push(tmp[t + i - 1], tmp[t + i - 1], '+');
  for (int i = 1; i <= L; i++)
    if ((n >> i) & 1) {
      if (y) push(y, tmp[t + i], '+');
      y += tmp[t + i];
    }
}
std::pair<long long, long long> gcd(long long x, long long y) {
  if (!y) return {1, 0};
  std::pair<long long, long long> t = gcd(y, x % y);
  return {t.second, t.first - t.second * (x / y)};
}
void solve(long long x) {
  int h = highbit(x);
  write(x, 1ll << h);
  push(x << h, x, '^');
  long long y = (x << h) ^ x;
  std::pair<long long, long long> t = gcd(x, y);
  long long r = mabs(x * t.first), s = mabs(y * t.second);
  while (min(r, s) & 1) {
    t.first += y, t.second -= x;
    r = mabs(x * t.first), s = mabs(y * t.second);
  }
  write(x, mabs(t.first));
  write(y, mabs(t.second));
  push(mabs(x * t.first), mabs(y * t.second), '^');
}
int main() {
  int t;
  scanf("%d", &t);
  solve(t);
  printf("%d\n", Q);
  for (int i = 1; i <= Q; i++)
    printf("%lld %c %lld\n", ans[i].first, opt[i], ans[i].second);
  return 0;
}