#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long double EPS = 1e11;
const long long INFL = 1e16;
const int INF = 1e9 + 7;
mt19937 rnd((unsigned)chrono::steady_clock::now().time_since_epoch().count());
int highdig(long long x) {
  int ans = 0;
  while (x > 0LL) {
    x /= 2LL;
    ++ans;
  }
  return ans;
}
long long umen(long long x, vector<long long>& ea, vector<long long>& eb,
               vector<char>& ec) {
  long long cx = x;
  long long highdigx = 1;
  while (highdigx * 2LL <= x) {
    highdigx *= 2LL;
  }
  while (cx % highdigx != 0LL) {
    ea.push_back(cx);
    eb.push_back(cx);
    ec.push_back('+');
    cx *= 2LL;
  }
  ea.push_back(x);
  ea.push_back(x);
  eb.push_back(cx);
  eb.push_back(cx);
  ec.push_back('+');
  ec.push_back('^');
  long long y2 = cx + x;
  long long y3 = (cx ^ x);
  ea.push_back(y2);
  eb.push_back(y3);
  ec.push_back('^');
  cx = (y2 ^ y3);
  while (highdig(cx) > highdig(x)) {
    long long ccx = x;
    while (highdig(ccx) < highdig(cx)) {
      ea.push_back(ccx);
      eb.push_back(ccx);
      ec.push_back('+');
      ccx *= 2LL;
    }
    ea.push_back(cx);
    eb.push_back(ccx);
    ec.push_back('^');
    cx ^= ccx;
  }
  while (highdig(cx) < highdig(x)) {
    ea.push_back(cx);
    eb.push_back(cx);
    ec.push_back('+');
    cx *= 2LL;
  }
  ea.push_back(x);
  eb.push_back(cx);
  ec.push_back('^');
  while ((x ^ cx) % 2 == 0) {
    cx = cx;
  }
  return (x ^ cx);
}
long long trie(long long x, vector<long long>& ea, vector<long long>& eb,
               vector<char>& ec) {
  ea.push_back(x);
  eb.push_back(x);
  ec.push_back('+');
  long long y1 = x * 2LL;
  ea.push_back(x);
  eb.push_back(y1);
  ec.push_back('+');
  long long y2 = x + y1;
  ea.push_back(y1);
  eb.push_back(y1);
  ec.push_back('+');
  ea.push_back(y2);
  eb.push_back(y1 * 2LL);
  ec.push_back('^');
  long long y3 = (y2 ^ (2 * y1));
  ea.push_back(y2);
  eb.push_back(y3);
  ec.push_back('+');
  long long y4 = y2 + y3;
  ea.push_back(2 * y1);
  eb.push_back(y4);
  ec.push_back('^');
  for (long long cd = 2LL; x > 1LL; cd *= 2LL) {
    ea.push_back(x);
    eb.push_back(cd);
    ec.push_back('^');
    ea.push_back(cd);
    eb.push_back(cd);
    ec.push_back('+');
    x ^= cd;
  }
  return 1LL;
}
void solve() {
  long long x;
  cin >> x;
  vector<long long> ea, eb;
  vector<char> ec;
  while (x > 1LL) {
    if ((x & (x + 1LL)) > 0LL) {
      x = umen(x, ea, eb, ec);
    } else {
      x = trie(x, ea, eb, ec);
    }
  }
  cout << ea.size() << "\n";
  for (int i = 0; i < ea.size(); ++i) {
    cout << ea[i] << " " << ec[i] << " " << eb[i] << "\n";
  }
}
int main() {
  int t = 1;
  for (int i = 0; i < t; ++i) {
    solve();
  }
  return 0;
}
