#include <bits/stdc++.h>
using namespace std;
vector<tuple<char, long long, long long>> ans;
void get(const long long x, const long long k) {
  long long now = x, lst = x;
  for (int i = 0; now != x * k; i++) {
    if (((k - 1) >> i) & 1) ans.emplace_back('+', now, lst), now += lst;
    ans.emplace_back('+', lst, lst);
    lst <<= 1;
  }
}
void solve(const long long x) {
  if (x == 1) return;
  int t = -1;
  for (int i = 30; i >= 0; i--)
    if ((x >> i) & 1) {
      t = i;
      break;
    }
  const long long y = x << t;
  get(x, 1ll << t);
  const long long z = x ^ y;
  ans.emplace_back('^', x, y);
  const long long p = z + y;
  ans.emplace_back('+', z, y);
  const long long q = p ^ x;
  ans.emplace_back('^', p, x);
  const long long h = y << 1;
  ans.emplace_back('+', y, y);
  const long long high = q ^ h;
  ans.emplace_back('^', q, h);
  long long now = y;
  while (now != (high >> 1)) {
    for (int i = 0; i <= 60; i++)
      if (now & (high << i)) {
        get(high, 1ll << i);
        ans.emplace_back('^', now, high << i);
        now ^= (high << i);
      }
  }
  ans.emplace_back('^', x, now);
  solve(x ^ now);
}
long long x;
int main() {
  scanf("%lld", &x);
  solve(x);
  printf("%d\n", (int)ans.size());
  for (auto [op, x, y] : ans) printf("%lld %c %lld\n", x, op, y);
  return 0;
}
