#include <bits/stdc++.h>
using namespace std;
struct pack {
  long long op, x, y;
};
vector<pack> ans;
void solve(long long x) {
  if (x == 1) return;
  long long up = 0, x_ = x;
  while (x_) x_ >>= 1, up++;
  long long nw = x;
  for (long long i = 1; i < up; i++) ans.push_back((pack){1, nw, nw}), nw <<= 1;
  long long y = nw;
  ans.push_back((pack){0, nw, x}), nw ^= x;
  ans.push_back((pack){1, nw, y}), nw += y;
  ans.push_back((pack){0, nw, x}), nw ^= x;
  ans.push_back((pack){1, y, y}), y <<= 1;
  ans.push_back((pack){0, nw, y}), nw ^= y;
  assert(nw == (nw & -nw));
  while ((1 << up) <= nw) {
    x_ = x;
    while (x_ != (x_ & -x_)) {
      ans.push_back((pack){1, x_, x_});
      x_ <<= 1;
      if (x_ & nw) {
        ans.push_back((pack){0, x_, nw});
        x_ ^= nw;
      }
    }
    nw = x_;
    assert(nw == (nw & -nw));
  }
  while (nw < (1 << up - 1)) ans.push_back((pack){1, nw, nw}), nw <<= 1;
  ans.push_back((pack){0, x, nw}), x ^= nw, solve(x);
}
signed main() {
  long long x;
  scanf("%lld", &x), solve(x), printf("%lld\n", (long long)ans.size());
  for (auto i : ans)
    printf("%lld ", i.x), i.op ? putchar('+') : putchar('^'),
        printf(" %lld\n", i.y);
  assert(ans.size() <= 100000);
  set<long long> st;
  st.insert(x);
  for (auto i : ans) {
    assert(st.count(i.x) && st.count(i.y));
    i.op ? (st.insert(i.x + i.y), 0) : (st.insert(i.x ^ i.y), 0);
  }
  assert(st.count(1));
  return 0;
}
