#include <bits/stdc++.h>
using namespace std;
vector<pair<unsigned long long, unsigned long long>> ans;
vector<int> op;
pair<long long, long long> ex_euclid(long long x, long long y) {
  if (x == 0) return make_pair(0, -1);
  pair<long long, long long> ret = ex_euclid(y % x, x);
  ret.second = -ret.first;
  ret.first = ((long long)1 + y * ret.second) / x;
  while (ret.first >= 0 && ret.second >= 0) {
    ret.first -= y;
    ret.second -= x;
  }
  while (ret.first < 0 || ret.second < 0) {
    ret.first += y;
    ret.second += x;
  }
  return ret;
}
void solve() {
  printf("%d\n", (int)ans.size());
  for (int i = 0; i < (int)ans.size(); i++) {
    if (op[i] == 1) {
      printf("%llu + %llu\n", ans[i].first, ans[i].second);
    } else
      printf("%llu ^ %llu\n", ans[i].first, ans[i].second);
  }
}
int main() {
  unsigned long long x;
  scanf("%llu", &x);
  if (x & 2) {
    ans.push_back(make_pair(x, x));
    ans.push_back(make_pair(x, x * 2));
    op.push_back(1);
    op.push_back(2);
    x = x ^ (x * 2);
  }
  int idx;
  for (idx = 30; idx >= 0; idx--)
    if (x & ((unsigned long long)1 << idx)) break;
  unsigned long long tmp = x;
  for (int i = 1; i <= idx; i++) {
    ans.push_back(make_pair(tmp, tmp));
    op.push_back(1);
    tmp <<= 1;
  }
  unsigned long long tmp1 = tmp + x, tmp2 = tmp ^ x;
  ans.push_back(make_pair(tmp, x));
  ans.push_back(make_pair(tmp, x));
  ans.push_back(make_pair(tmp1, tmp2));
  op.push_back(1);
  op.push_back(2);
  op.push_back(2);
  unsigned long long y = tmp1 ^ tmp2;
  pair<long long, long long> rrans = ex_euclid(x, y);
  pair<unsigned long long, unsigned long long> rans;
  rans.first = rrans.first;
  rans.second = rrans.second;
  vector<int> bita, bitb;
  for (int i = 63; i >= 0; i--) {
    if (rans.first & ((unsigned long long)1 << i)) bita.push_back(i);
    if (rans.second & ((unsigned long long)1 << i)) bitb.push_back(i);
  }
  vector<unsigned long long> tmpa, tmpb;
  tmpa.push_back(x);
  tmpb.push_back(y);
  unsigned long long curx = x, cury = y;
  for (int i = 1; i <= bita[0]; i++) {
    ans.push_back(make_pair(curx, curx));
    op.push_back(1);
    curx <<= 1;
    tmpa.push_back(curx);
  }
  for (int i = 1; i <= bitb[0]; i++) {
    ans.push_back(make_pair(cury, cury));
    op.push_back(1);
    cury <<= 1;
    tmpb.push_back(cury);
  }
  unsigned long long cura = tmpa.back(), curb = tmpb.back();
  for (int i = 1; i < (int)bita.size(); i++) {
    ans.push_back(make_pair(cura, tmpa[bita[i]]));
    op.push_back(1);
    cura += tmpa[bita[i]];
  }
  for (int i = 1; i < (int)bitb.size(); i++) {
    ans.push_back(make_pair(curb, tmpb[bitb[i]]));
    op.push_back(1);
    curb += tmpb[bitb[i]];
  }
  assert(cura - curb == 1);
  if (curb & 1) {
    ans.push_back(make_pair(curb, curb));
    ans.push_back(make_pair(curb, cura));
    op.push_back(1);
    op.push_back(1);
    curb = curb * 2;
    cura = curb * 2 + 1;
  }
  ans.push_back(make_pair(curb, cura));
  op.push_back(2);
  solve();
  return 0;
}
