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;
namespace IO {
template <class T>
void _R(T &x) {
  cin >> x;
}
void _R(int &x) { scanf("%d", &x); }
void _R(long long &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { x = getchar(); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template <class T, class... U>
void R(T &head, U &...tail) {
  _R(head), R(tail...);
}
template <class T>
void _W(const T &x) {
  cout << x;
}
void _W(const int &x) { printf("%d", x); }
void _W(const long long &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template <class T, class U>
void _W(const pair<T, U> &x) {
  _W(x.F), putchar(' '), _W(x.S);
}
template <class T>
void _W(const vector<T> &x) {
  for (auto i = x.begin(); i != x.end(); _W(*i++))
    if (i != x.cbegin()) putchar(' ');
}
void W() {}
template <class T, class... U>
void W(const T &head, const U &...tail) {
  _W(head), putchar(sizeof...(tail) ? ' ' : '\n'), W(tail...);
}
}  // namespace IO
using namespace IO;
const int maxn = 1e5 + 50;
const int mod = 1e9 + 7;
long long qp(long long a, long long n) {
  long long res = 1;
  n %= mod - 1;
  if (n < 0) n += mod - 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
long long qp(long long a, long long n, int mod) {
  long long res = 1;
  n %= mod - 1;
  if (n < 0) n += mod - 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
long long exgcd(long long a, long long b, long long &x, long long &y) {
  long long d = a;
  if (b)
    d = exgcd(b, a % b, y, x), y -= x * (a / b);
  else
    x = 1, y = 0;
  return d;
}
bool solve(long long a, long long b, long long c, long long &x, long long &y,
           long long &dx, long long &dy) {
  x = y = dx = dy = 0;
  if (a == 0 && b == 0) return 0;
  long long x0, y0;
  long long d = exgcd(a, b, x0, y0);
  if (c % d != 0) return 0;
  dx = b / d, dy = a / d;
  x = (x0 % dx * ((c / d) % dx) % dx + dx) % dx;
  y = (c - a * x) / b;
  return 1;
}
struct node {
  long long x, y;
  int flag;
};
map<long long, int> mp;
vector<node> res;
long long deal(long long x, long long n) {
  assert(n > 0);
  long long ans = x;
  n--;
  while (n > 0) {
    if (n & 1) {
      if (!mp[ans + x]) res.push_back({ans, x, 0}), mp[ans + x] = 1;
      ans = ans + x;
    }
    if (!mp[x + x]) res.push_back({x, x, 0}), mp[x + x] = 1;
    x = x + x;
    n >>= 1;
  }
  return ans;
}
int main(int argc, char *argv[]) {
  long long x;
  R(x);
  long long t = 0;
  long long xt = x;
  while (xt > 0) {
    xt >>= 1;
    t++;
  }
  long long y = deal(x, 1ll << (t - 1));
  if (!mp[x ^ y]) res.push_back({x, y, 1}), mp[x ^ y] = 1;
  y ^= x;
  long long xx, yy, dx, dy;
  assert(solve(x, y, 1, xx, yy, dx, dy));
  if (xx % 2 == 0) {
    xx += dx;
    yy -= dy;
  }
  x = deal(x, xx);
  y = deal(y, -yy);
  assert(x == y + 1);
  if (!mp[x ^ y]) res.push_back({x, y, 1}), mp[x ^ y] = 1;
  W((int)res.size());
  for (auto &i : res) W(i.x, i.flag ? "^" : "+", i.y);
  return 0;
}