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 GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <class T>
inline bool setmin(T &a, T b) {
  if (a > b) return a = b, 1;
  return 0;
}
template <class T>
inline bool setmax(T &a, T b) {
  if (a < b) return a = b, 1;
  return 0;
}
template <class T>
inline T fast(T a, T b, T mod) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
template <class T>
istream &operator>>(istream &os, vector<T> &container) {
  for (auto &u : container) os >> u;
  return os;
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &container) {
  for (auto &u : container) os << u << " ";
  return os;
}
template <class T>
inline T gcd(T a, T b) {
  while (b) swap(a %= b, b);
  return abs(a);
}
const long long INF = 1e9 + 7;
const long long mod = 998244353;
const long long BIG_INF = 1e18 + 7;
const long long N = 1e6 + 7;
const long long T = 1 << 20;
const long double inf = 1e18;
const int MLIM = 10000000;
bitset<MLIM + 7> mam;
int LIM;
vector<string> op;
void wypisz() {
  cout << (int)(op).size() << '\n';
  for (auto &u : op) {
    cout << u << '\n';
  }
}
void dodaj(vector<long long> &baza, long long val) {
  for (int i = 62; i >= 0; i--) {
    if (val & (1ll << i)) {
      if (!baza[i]) {
        baza[i] = val;
        return;
      } else {
        op.push_back(to_string(val) + " ^ " + to_string(baza[i]));
        val = val ^ baza[i];
      }
    }
  }
}
bool baza_contains(vector<long long> &baza, long long val) {
  for (int i = 62; i >= 0; i--) {
    if (val & (1ll << i)) {
      if (baza[i] == 0) {
        return false;
      } else
        val = val ^ baza[i];
    }
  }
  return true;
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> baza(64);
  dodaj(baza, n);
  while (baza[0] == 0) {
    bool found = 0;
    for (int i = 0; i < 63; i++) {
      for (int j = i; j < 63; j++) {
        if (baza[i] and baza[j] and baza[i] + baza[j] < BIG_INF and
            !baza_contains(baza, baza[i] + baza[j])) {
          op.push_back(to_string(baza[j]) + " + " + to_string(baza[i]));
          dodaj(baza, baza[i] + baza[j]);
          found = true;
          break;
        }
      }
      if (found) break;
    }
  }
  wypisz();
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  while (t--) solve();
}