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;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long int mod = 998244353;
const long long int N = 200100;
const long long int M = log2(N) + 1;
struct point {
  long long int x, y;
};
template <typename T>
T fast_exp(T x, T n) {
  if (n == 0) return 1;
  T ans = 1;
  if (n % 2 == 0) {
    ans = fast_exp(x, n / 2);
    ans = ans * ans % mod;
  } else
    ans = fast_exp(x, n - 1) * x % mod;
  return ans;
}
void update(long long int BIT[], long long int i, long long int x,
            long long int n) {
  if (i <= 0) return;
  for (; i <= n; i += i & (-i)) BIT[i] += x;
}
long long int query(long long int BIT[], long long int l, long long int r) {
  l--;
  long long int sum = 0;
  while (r > 0) {
    sum += BIT[r];
    r = r & (r - 1);
  }
  while (l > 0) {
    sum -= BIT[l];
    l = l & (l - 1);
  }
  return sum;
}
long long int fact[N], infact[N];
void work() {
  fact[0] = fact[1] = infact[0] = infact[1] = 1;
  for (long long int i = 2; i < N; i++) {
    fact[i] = fact[i - 1] * i % mod;
    infact[i] = fast_exp(fact[i], mod - 2);
  }
}
long long int ncr(long long int n, long long int r) {
  if (r > n || r < 0) return 0;
  return fact[n] * infact[n - r] % mod * infact[r] % mod;
}
vector<long long int> p;
void SoE(int n = N - 1) {
  bool Primes[n + 1];
  Primes[0] = Primes[1] = 0;
  for (int i = 2; i < n + 1; i++) Primes[i] = 1;
  for (int i = 2; i * i <= n; i++) {
    if (Primes[i] == 1) {
      for (int j = i; i * j <= n; j++) {
        Primes[i * j] = 0;
      }
    }
  }
  for (long long int i = 2; i < n + 1; i++) {
    if (Primes[i]) {
      p.push_back(i);
    }
  }
}
long long int msb(long long int n) {
  long long int res = -1;
  while (n > 0) {
    n /= 2;
    res++;
  }
  return res;
}
string perform(long long int x, string op, long long int y) {
  return to_string(x) + op + to_string(y);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int _ = 1, test = 0;
  while (_--) {
    test++;
    long long int n, m, x = 0, y = 0, ans = 0, k = 1;
    cin >> n;
    vector<string> sol;
    if (n & 2) {
      sol.push_back(perform(n, " + ", n));
      sol.push_back(perform(n, " ^ ", 2 * n));
      n = n ^ (2 * n);
    }
    x = msb(n);
    y = n;
    for (int i = 0; i < x; i++) {
      sol.push_back(perform(y, " + ", y));
      y = y + y;
    }
    sol.push_back(perform(n, " ^ ", y));
    sol.push_back(perform(n, " + ", y));
    k = n + y;
    y = n ^ y;
    sol.push_back(perform(k, " ^ ", y));
    k = k ^ y;
    m = 2 * n;
    for (int i = 1; i <= x; i++) {
      if (n & (1ll << i)) {
        sol.push_back(perform(n, " ^ ", m));
        n = n ^ m;
      }
      m = 2 * m;
    }
    for (int i = x + 1; i <= 50; i++) {
      if (n & (1ll << i)) {
        sol.push_back(perform(n, " ^ ", k));
        n = n ^ k;
      }
      sol.push_back(perform(k, " + ", k));
      k = 2 * k;
    }
    cout << sol.size() << "\n";
    for (auto i : sol) cout << i << "\n";
  }
  return 0;
}