#include <bits/stdc++.h>
using namespace std;
struct node {
  long long tp, x, y;
};
vector<node> ans;
void Mul(long long x, long long y) {
  long long s = 0;
  for (; y;) {
    if (y & 1) ans.push_back((node){2, s, x}), s += x;
    if (y /= 2) ans.push_back((node){2, x, x}), x += x;
  }
}
void exgcd(long long x, long long y, long long &a, long long &b) {
  if (!y) {
    a = 1;
    b = 0;
    return;
  }
  exgcd(y, x % y, b, a);
  b -= x / y * a;
}
int main() {
  long long x;
  scanf("%lld", &x);
  ans.push_back((node){1, x, x});
  long long y = 1;
  for (; y * 2 <= x; y *= 2)
    ;
  Mul(x, y);
  long long z = x * y;
  ans.push_back((node){1, z, x});
  z ^= x;
  long long a, b;
  exgcd(x, z, a, b);
  b *= -1;
  for (; a < 0 || b < 0; b += x, a += z)
    ;
  if (b % 2 == 1) b += x, a += z;
  Mul(x, a);
  Mul(z, b);
  ans.push_back((node){1, x * a, z * b});
  printf("%d\n", ans.size());
  for (auto i : ans) printf("%lld %c %lld\n", i.x, i.tp == 1 ? '^' : '+', i.y);
}
