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;
const int MAXN = 100000;
long long x, y;
vector<pair<long long, pair<char, long long> > > ans;
void gen2(int e) {
  long long curr = x;
  for (int i = 0; i < e; i++) {
    ans.push_back(make_pair(curr, make_pair('+', curr)));
    curr *= 2;
  }
  ans.push_back(make_pair(curr, make_pair('^', x)));
  y = curr ^ x;
}
long long gen(long long a, long long c) {
  long long curr = c;
  vector<long long> nums;
  nums.push_back(curr);
  for (long long i = 0; (1LL << i) <= a; i++) {
    ans.push_back(make_pair(curr, make_pair('+', curr)));
    curr *= 2;
    nums.push_back(curr);
  }
  curr = 0;
  for (long long i = 0; (1LL << i) <= a; i++) {
    if ((1LL << i) & a) {
      if (curr == 0) {
        ans.push_back(make_pair(x, make_pair('+', nums[i])));
      } else {
        ans.push_back(make_pair(curr, make_pair('+', nums[i])));
      }
      curr += nums[i];
    }
  }
  return curr;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> x;
  int e = 0;
  long long curr = 1;
  while (2 * curr <= x) {
    e++;
    curr *= 2;
  }
  gen2(e);
  long long fa = -1;
  long long fb = -1;
  for (long long b = 0; b < x; b++)
    if ((1 + b * y) % x == 0) {
      long long a = (1 + b * y) / x;
      if (a * x == 1 + b * y) {
        fa = a;
        fb = b;
        break;
      }
    }
  long long ax = gen(fa, x);
  long long by = gen(fb, y);
  if (by % 2 == 0) {
    ans.push_back(make_pair(ax, make_pair('^', by)));
  } else {
    ans.push_back(make_pair(by, make_pair('+', x)));
    ans.push_back(make_pair(ax, make_pair('+', x)));
    ans.push_back(make_pair(by + x, make_pair('^', ax + x)));
  }
  cout << ans.size() << "\n";
  for (auto it : ans) {
    cout << it.first << " " << it.second.first << " " << it.second.second
         << "\n";
  }
}