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;
#pragma GCC optimize("-O3")
ostream &operator<<(ostream &out, string str) {
  for (char c : str) out << c;
  return out;
}
template <class L, class R>
ostream &operator<<(ostream &out, pair<L, R> p) {
  return out << "(" << p.first << ", " << p.second << ")";
}
template <class T>
auto operator<<(ostream &out, T a) -> decltype(a.begin(), out) {
  out << '{';
  for (auto it = a.begin(); it != a.end(); it = next(it))
    out << (it != a.begin() ? ", " : "") << *it;
  return out << '}';
}
void dump() { cerr << "\n"; }
template <class T, class... Ts>
void dump(T a, Ts... x) {
  cerr << a << ", ";
  dump(x...);
}
const long long MAX = (long long)2e18;
vector<string> trzy = {"3 + 3", "3 ^ 6", " 3 + 5 ", "3 + 6", "8 ^ 9"};
vector<string> operacje;
string pluss(long long x, long long y) {
  return to_string(x) + " + " + to_string(y);
}
string xorr(long long x, long long y) {
  return to_string(x) + " ^ " + to_string(y);
}
void generate_pow(long long x) {
  while (x < MAX) {
    operacje.push_back(pluss(x, x));
    x *= 2;
  }
}
long long mult(long long x, long long y, long long MOD) {
  __int128_t X = x;
  __int128_t Y = y;
  __int128_t M = MOD;
  __int128_t res = (X * Y) % M;
  return res;
}
long long fas_pow(long long x, long long pot, long long MOD) {
  if (pot == 0) return 1;
  if (pot % 2 == 1)
    return mult(fas_pow(x, pot - 1, MOD), x, MOD);
  else {
    long long A = fas_pow(x, pot / 2, MOD);
    return mult(A, A, MOD);
  }
}
void mult(long long x, long long S) {
  long long cur = 0;
  for (long long i = 0; i < 61; i++)
    if (S & (1ll << i)) {
      if (cur != 0) operacje.push_back(pluss(cur, (1ll << i) * x));
      cur += (1ll << i) * x;
    }
  return;
}
void solve(long long x) {
  if (x == 1) return;
  generate_pow(x);
  long long MOD1 = 1ll << 21;
  long long MOD2 = 1ll << 41;
  long long A = fas_pow(x, MOD1 / 2 - 1, MOD1);
  long long B = fas_pow(x, MOD2 / 2 - 1, MOD2);
  operacje.push_back(pluss(x, x));
  mult(x, A);
  operacje.push_back(pluss(x, x));
  mult(x, B);
  A *= x;
  B *= x;
  operacje.push_back(pluss(B, A));
  long long C = B + A;
  operacje.push_back(xorr(B, A));
  long long D = B ^ A;
  operacje.push_back(xorr(C, D));
  generate_pow(2);
  for (long long i = 1; i < 61; i++)
    if (x & (1ll << i)) {
      operacje.push_back(xorr(x, (1ll << i)));
      x ^= (1ll << i);
    }
  return;
}
void app(set<long long> &Q, string s) {
  stringstream first(s);
  long long a, b;
  char c;
  first >> a >> c >> b;
  assert(Q.find(a) != Q.end() && Q.find(b) != Q.end());
  if (c == '^')
    Q.insert(a ^ b);
  else
    Q.insert(a + b);
}
int32_t main() {
  long long q;
  cin >> q;
  solve(q);
  cout << operacje.size() << "\n";
  set<long long> S = {q};
  for (auto s : operacje) {
    cout << s << "\n";
    app(S, s);
  }
  assert(S.count(1) > 0);
}