#include <bits/stdc++.h>
#pragma warning(disable : 4996)
template <typename T>
T min(T x, T y) {
  return x < y ? x : y;
}
template <typename T>
T max(T x, T y) {
  return x > y ? x : y;
};
const long long INF = 20000000050000;
const long long mod = 998244353;
const long long MAXN = 100005;
long long mabs(long long x) { return x > 0 ? x : -x; }
int Q;
std::pair<long long, long long> ans[MAXN];
char opt[MAXN];
long long tmp[MAXN];
int sz;
void push(long long x, long long y, char op) {
  ans[++Q] = {x, y};
  opt[Q] = op;
  tmp[++sz] = op == '+' ? x + y : x ^ y;
}
int highbit(long long x) {
  int h = 60;
  while (!((x >> h) & 1)) h--;
  return h;
}
void write(long long x, long long n) {
  int L = highbit(n);
  tmp[++sz] = x;
  int t = sz;
  long long y = n & 1 ? x : 0;
  for (int i = 1; i <= L; i++) push(tmp[t + i - 1], tmp[t + i - 1], '+');
  for (int i = 1; i <= L; i++)
    if ((n >> i) & 1) {
      if (y) push(y, tmp[t + i], '+');
      y += tmp[t + i];
    }
}
std::pair<long long, long long> gcd(long long x, long long y) {
  if (!y) return {1, 0};
  std::pair<long long, long long> t = gcd(y, x % y);
  return {t.second, t.first - t.second * (x / y)};
}
void solve(long long x) {
  int h = highbit(x);
  write(x, 1ll << h);
  push(x << h, x, '^');
  long long y = (x << h) ^ x;
  std::pair<long long, long long> t = gcd(x, y);
  long long r = mabs(x * t.first), s = mabs(y * t.second);
  while (min(r, s) & 1) {
    t.first += y, t.second -= x;
    r = mabs(x * t.first), s = mabs(y * t.second);
  }
  write(x, mabs(t.first));
  write(y, mabs(t.second));
  push(mabs(x * t.first), mabs(y * t.second), '^');
}
int main() {
  int t;
  scanf("%d", &t);
  solve(t);
  printf("%d\n", Q);
  for (int i = 1; i <= Q; i++)
    printf("%lld %c %lld\n", ans[i].first, opt[i], ans[i].second);
  return 0;
}
