#include <bits/stdc++.h>
using namespace std;
long long x, x2, p, z, px1, px2, a;
vector<pair<pair<long long, char>, long long>> sol;
vector<long long> v1, v2;
int main() {
  cin >> x;
  if ((x & (1 << 1)) > 0) {
    sol.push_back({{x, '+'}, x});
    sol.push_back({{x, '^'}, x * 2});
    x = x ^ (x * 2);
  }
  for (int i = 0; i <= 20; i++) {
    if ((x & (1 << i)) > 0) {
      z = i;
    }
  }
  x2 = x;
  v1.push_back(x2);
  for (int i = 0; i <= z; i++) {
    sol.push_back({{x2, '+'}, x2});
    x2 *= 2;
    v1.push_back(x2);
  }
  p = x;
  for (int i = 1; i <= z; i++) {
    if ((p & (1 << i)) > 0) {
      sol.push_back({{p, '^'}, v1[i]});
      p = p ^ v1[i];
    }
  }
  sol.push_back({{p, '+'}, x});
  px1 = p + x;
  sol.push_back({{p, '^'}, x});
  px2 = p ^ x;
  sol.push_back({{px1, '^'}, px2});
  v2.push_back(px1 ^ px2);
  for (int i = 0; i < z; i++) {
    a = v2.back();
    sol.push_back({{a, '+'}, a});
    v2.push_back(a + a);
  }
  for (int i = 1; i <= z; i++) {
    if ((x & (1 << i)) > 0) {
      a = v2[i - 1];
      sol.push_back({{x, '^'}, a});
      x = x ^ a;
    }
  }
  cout << sol.size() << endl;
  for (auto e : sol) {
    cout << e.first.first << " " << e.first.second << " " << e.second << endl;
  }
}
