#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
long long x;
struct note {
  long long x, op, y;
};
vector<note> ans;
void exgcd(long long a, long long b, long long &x, long long &y) {
  if (!b) {
    x = 1;
    y = 0;
    return;
  }
  exgcd(b, a % b, y, x);
  y -= a / b * x;
}
void ks_add(long long a, long long b) {
  long long res = -1;
  while (b) {
    if (b & 1) {
      if (res == -1)
        res = a;
      else {
        ans.push_back({res, 0, a});
        res += a;
      }
    }
    ans.push_back({a, 0, a});
    a += a;
    b >>= 1;
  }
}
void solve() {
  scanf("%lld", &x);
  long long now = 1;
  while (2LL * now < x) {
    ans.push_back({now * x, 0, now * x});
    now *= 2LL;
  }
  ans.push_back({x, 1, now * x});
  long long y = (x ^ (now * x));
  long long a, b;
  exgcd(x, y, a, b);
  b = -b;
  if (a <= 0) {
    long long c = (-a) / y + 1;
    a += c * y;
    b += c * x;
  }
  if (b & 1) a += y, b += x;
  ks_add(x, a);
  ks_add(y, b);
  ans.push_back({a * x, 1, b * y});
  printf("%d\n", (int)ans.size());
  for (auto v : ans) {
    printf("%lld %c %lld\n", v.x, "+^"[v.op], v.y);
  }
}
int main() {
  solve();
  return 0;
}
