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;
using ull = unsigned long long;
using ll = long long;
using ld = long double;
const int mod = 1e9 + 7;
const double pi = acos(-1.0);
const int inf = INT_MAX;
namespace euclidean {
template <typename T>
tuple<T, T, T> extEuclid(T a, T b) {
  if (b == 0) {
    return make_tuple(a, 1, 0);
  }
  auto [g, x, y] = extEuclid(b, a % b);
  return make_tuple(g, y, x - y * (a / b));
}
template <typename T>
T gcd(T a, T b) {
  return get<0>(extEuclid(a, b));
}
template <typename T>
T modInverse(T a, T m) {
  auto [g, x, y] = extEuclid(a, m);
  if (g != 1) {
    return -1;
  } else {
    return (x % m + m) % m;
  }
}
}  // namespace euclidean
using namespace euclidean;
vector<tuple<int, ll, ll>> ans;
ll multiple(ll x, ll n) {
  vector<ll> pows = {x};
  for (int i = 1; (1ll << i) <= n; i++) {
    ans.emplace_back(1, pows.back(), pows.back());
    pows.push_back(2 * pows.back());
  }
  int low_bit = 64 - __builtin_clzll(n & -n) - 1;
  ll cur = pows[low_bit];
  for (int i = low_bit + 1; (1ll << i) <= n; i++) {
    if (n & (1ll << i)) {
      ans.emplace_back(1, cur, pows[i]);
      cur += pows[i];
    }
  }
  return cur;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll x;
  cin >> x;
  int high_bit = 64 - __builtin_clzll(x) - 1;
  ll y = multiple(x, 1ll << high_bit);
  ans.emplace_back(2, x, y);
  y ^= x;
  auto [g, a, b] = extEuclid(x, y);
  if (a < 0 and ((-a) & 1)) {
    a -= y;
    b += x;
  } else if ((-b) & 1) {
    a += y;
    b -= x;
  }
  ll num1 = multiple(x, abs(a));
  ll num2 = multiple(y, abs(b));
  ans.emplace_back(2, num2, num1);
  cout << ans.size() << '\n';
  for (auto& [t, x, y] : ans) {
    if (t == 1) {
      cout << x << " + " << y << '\n';
    } else {
      cout << x << " ^ " << y << '\n';
    }
  }
  return 0;
}