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 int inf = 1.01e9;
const double eps = 1e-9;
int rnd() { return (rand() + (rand() << 15)) & ((1LL << (30)) - 1); }
string bin(long long x) {
  string res = "";
  while (x) {
    if (x % 2 == 0)
      res += "0";
    else
      res += "1";
    x >>= 1;
  }
  return res;
}
vector<pair<char, pair<long long, long long>>> solve(long long x) {
  vector<long long> v;
  v.push_back(x);
  vector<pair<char, pair<long long, long long>>> ans;
  unordered_set<long long> second;
  second.insert(x);
  map<long long, pair<char, pair<long long, long long>>> opt;
  opt[2 * x] = {'+', {x, x}};
  int fst = 0;
  for (int i = 1; i < 30; i++)
    if (x & (1LL << (i))) {
      fst = i;
    }
  int iter = 0;
  while (1) {
    iter++;
    pair<long long, pair<char, pair<long long, long long>>> z;
    if (iter <= fst) {
      z = *opt.find(x * (1LL << (iter)));
    } else if (iter <= fst + 2) {
      long long N = x * (1LL << (fst));
      if (iter == fst + 1) {
        z = *opt.find(N + x);
      } else {
        z = *opt.find(N + 2 * x);
      }
    } else {
      z = *opt.begin();
    }
    opt.erase(opt.find(z.first));
    if (second.find(z.first) != second.end()) continue;
    long long val = z.first;
    auto how = z.second;
    ans.push_back(how);
    if (val == 1) return ans;
    second.insert(val);
    for (int i = 0; (i) < (((int)(v).size())); ++i) {
      if (v[i] % 2 == 1 || val % 2 == 1) {
        long long zz = v[i] + val;
        if (second.find(zz) == second.end() && zz > 0) {
          opt[zz] = {'+', {v[i], val}};
        }
        zz = v[i] ^ val;
        if (second.find(zz) == second.end() && zz > 0) {
          opt[zz] = {'^', {v[i], val}};
        }
      }
    }
    opt[2 * val] = {'+', {val, val}};
    v.push_back(val);
  }
  return ans;
}
int main() {
  if (1) {
    int x;
    scanf("%d", &x);
    auto z = solve(x);
    printf("%d\n", ((int)(z).size()));
    for (auto t : z) {
      printf("%lld %c %lld\n", t.second.first, t.first, t.second.second);
    }
  } else {
    for (int i = 0; (i) < (1000); ++i) {
      srand(i);
      int x = rnd() % 1000000;
      if (x % 2 == 0) x++;
      fprintf(stderr, "i=%d  x=%d  ", i, x), fflush(stderr);
      auto z = solve(x);
      fprintf(stderr, "sz=%d\n", ((int)(z).size())), fflush(stderr);
    }
  }
  return 0;
}