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;
void enable_comma() {}
string tostring(char c) {
  string s = "";
  s += c;
  return s;
}
string tostring(string s) { return "\"" + s + "\""; }
string tostring(const char *c) { return tostring((string)c); }
string tostring(long long x) {
  if (x < 0) return "-" + tostring(-x);
  if (x > 9)
    return tostring(x / 10) + tostring(char('0' + x % 10));
  else
    return tostring(char('0' + x));
}
string tostring(int x) { return tostring((long long)x); }
string tostring(unsigned long long x) {
  if (x > 9)
    return tostring((long long)(x / 10)) + tostring(char('0' + x % 10));
  else
    return tostring(char('0' + x));
}
string tostring(unsigned x) { return tostring((long long)x); }
string tostring(double x) {
  static char res[114];
  sprintf(res, "%lf", x);
  string s = tostring(res);
  return s.substr(1, (int)s.size() - 2);
}
string tostring(long double x) { return tostring((double)x); }
template <class A, class B>
string tostring(pair<A, B> p) {
  return "(" + tostring(p.first) + "," + tostring(p.second) + ")";
}
template <class T>
string tostring(T v) {
  string res = "";
  for (auto p : v) res += (res.size() ? "," : "{") + tostring(p);
  return res.size() ? res + "}" : "{}";
}
template <class A>
string tostring(A *a, int L, int R) {
  return tostring(vector<A>(a + L, a + R + 1));
};
template <class A>
string tostring(A a, int L, int R) {
  return tostring(a.data(), L, R);
}
string tostrings() { return ""; }
template <typename Head, typename... Tail>
string tostrings(Head H, Tail... T) {
  return tostring(H) + " " + tostrings(T...);
}
long long read() {
  long long x = 0, f = 0;
  char ch = getchar();
  while (!isdigit(ch)) f = ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  return f ? -x : x;
}
template <class T>
void ckmax(T &x, const T y) {
  if (x < y) x = y;
}
template <class T>
void ckmin(T &x, const T y) {
  if (x > y) x = y;
}
const int N = 100005;
struct op {
  int tp;
  long long a, b;
};
vector<op> res;
int a[60];
set<long long> S;
long long gao(int tp, long long a, long long b) {
  (!(S.count(a) && S.count(b)) ? cout << "Assertion failed!" << endl
                                      << "function: " << __FUNCTION__ << endl
                                      << "line: " << 149 << endl
                                      << "expression: "
                                      << "S.count(a) && S.count(b)" << endl,
   exit(3), 0 : 1);
  res.push_back({tp, a, b});
  long long res = tp ? a ^ b : a + b;
  S.insert(res);
  (!(0 <= res && res <= 5000000000000000000LL)
   ? cout << "Assertion failed!" << endl
          << "function: " << __FUNCTION__ << endl
          << "line: " << 153 << endl
          << "expression: "
          << "0 <= res && res <= 5000000000000000000LL" << endl,
   exit(3), 0 : 1);
  return res;
}
int Log(long long x) {
  int ans = 0;
  while (x > 1) {
    ans++;
    x >>= 1;
  }
  return ans;
}
int main() {
  long long x = read();
  srand(time(NULL));
  S.clear();
  res.clear();
  S.insert(x);
  while (x > 1) {
    vector<long long> v = {x};
    while (1) {
      int p = (int)v.size() - 1;
      while (p > 0 && rand() % 5 != 0) p--;
      long long a = v.back(), b = gao(0, a, a), c = gao(0, v[p], b);
      if (Log(b) != Log(c)) {
        v.push_back(c);
        continue;
      } else {
        long long t = b ^ c;
        for (int i = ((int)v.size() - 1); i >= (0); i--) {
          if (Log(t) == Log(v[i] * 2)) t ^= v[i] * 2;
          if (Log(t) == Log(v[i])) t ^= v[i];
        }
        if (~t & 1) {
          v.push_back(c);
          continue;
        }
        t = gao(1, b, c);
        for (int i = ((int)v.size() - 1); i >= (0); i--) {
          if (Log(t) == Log(v[i] * 2)) t = gao(1, t, v[i] * 2);
          if (Log(t) == Log(v[i])) t = gao(1, t, v[i]);
        }
        (!(Log(t) < Log(x)) ? cout << "Assertion failed!" << endl
                                   << "function: " << __FUNCTION__ << endl
                                   << "line: " << 198 << endl
                                   << "expression: "
                                   << "Log(t) < Log(x)" << endl,
         exit(3), 0 : 1);
        x = t;
        break;
      }
    }
  }
  printf("%d\n", (int)res.size());
  for (auto v : res) printf("%I64d %c %I64d\n", v.a, "+^"[v.tp], v.b);
  return 0;
}