#ifndef _TEMPLATE_ROOT
#define _TEMPLATE_ROOT
#include "bits/stdc++.h"
using namespace std;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define repl(i, a, b) for(ll i = a; i < (b); ++i)
#define repd(i, a, b) for(int i = a; i >= (b); --i)
#define repdl(i, a, b) for(ll i = a; i >= (b); --i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
template<typename H> bool chmin(H& v1, const H v2) { if (v1 > v2) { v1 = v2; return true; } return false; }
template<typename H> bool chmax(H& v1, const H v2) { if (v1 < v2) { v1 = v2; return true; } return false; }
#endif
#ifndef _TEMPLATE_IO
#define _TEMPLATE_IO

template<typename H> void read(H& head) { cin >> head; }
template<typename H, typename ...T> void read(H& head, T& ...tail) { cin >> head; read(tail...); }
template<typename H> void write(H head) { cout << head << '\n'; }
template<typename H, typename ...T> void write(H head, T ...tail) { cout << head << " "; write(tail...); }
template<typename ...T> void writef(T ...tail) { write(tail...); cout << flush; }
template<typename ...T> void die(T ...tok) { write(tok...); exit(0); }
template<typename T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  if (v.size()) {
    rep(i, 0, sz(v) - 1)
      out << v[i] << " ";
    out << v.back();
  }
  return out;
}
#endif
using namespace std;
typedef unsigned long long ull;

ull mem[200000];
int A = 0, B = 1;

vector<string> ops;

void _bassert(ull val1, ull val2, const char* expr1, const char* expr2, int linum) {
#ifndef ONLINE_JUDGE
  if (val1 == val2) {
    printf("L%d: %s == %s == %llu\n", linum, expr1, expr2, val1);
  } else {
    printf("L%d: %s [%llu] != %s [%llu]\n", linum, expr1, val1, expr2, val2);
    exit(1);
  }
#endif
}
#define bassert(e1, e2) _bassert(e1, e2, #e1, #e2, __LINE__)

#ifndef ONLINE_JUDGE
#define debug(...) printf(__VA_ARGS__)
#else
#define debug(...)
#endif

const ull V = 10'000'000'000'000'000'000ull;

void cmp(int k, int i, int j) {
  char buf[50];
  sprintf(buf, "< %d %d %d", i, j, k);
  ops.push_back(string(buf));

  mem[k] = mem[i] < mem[j] ? 1 : 0;
  assert(mem[k] < V);
}
void add(int k, int i, int j) {
  char buf[50];
  sprintf(buf, "+ %d %d %d", i, j, k);
  ops.push_back(string(buf));

  mem[k] = mem[i] + mem[j];
  assert(mem[k] < V);
}

int alloc_id = 3;
int alloc() {
  return alloc_id++;
}

int C[11]; // constants
int P2[64]; // powers of 2

void mov(int k, int i) {
  add(k, C[0], i);
}
void bor(int k, int i, int j) {
  add(k, i, j);
  cmp(k, C[0], k);
}
void band(int k, int i, int j) {
  add(k, i, j);
  cmp(k, C[1], k);
}
void bnot(int k, int i) {
  cmp(k, i, C[1]);
}
void sub(int k, int i, int j) {
  int acc = alloc();
  mov(acc, C[0]);
  
  int ip1 = alloc();
  add(ip1, i, C[1]);

  int t1 = alloc(), t2 = alloc();
  repd(d, 29, 0) {
    // k = i - j -> k + j = =i
    add(t1, acc, j);
    add(t1, t1, P2[d]);
    cmp(t2, t1, ip1);

    debug("t1 = acc [%llu] + 2^%d [%llu] = %llu\n", mem[acc], d, mem[P2[d]], mem[t1]);

    rep(e, 0, d) add(t2, t2, t2); /// t2 <<= d
    add(acc, acc, t2);
  }

  debug("%llu = %llu - %llu\n", mem[acc], mem[i], mem[j]);
  bassert(mem[acc], mem[i] >= mem[j] ? mem[i] - mem[j] : 0ull);
  mov(k, acc);
}
void if0(int k, int cond, int val) {
  ull o_cond = mem[cond], o_val = mem[val];  

  int ncond = alloc();
  bnot(ncond, cond);
  rep(i, 0, 30) add(ncond, ncond, ncond); // cond <<= 30
  mov(k, val);

  debug("k = k [%llu] - ncond [%llu]\n", mem[k], mem[ncond]);
  sub(k, k, ncond);

  debug("cond: %llu, ncond: %llu\n", mem[cond], mem[ncond]);
  debug("original condition: %llu, value: %llu\n", o_cond, o_val);
  debug("retval: %llu\n", mem[k]);
  bassert(mem[k], o_cond ? o_val : 0);
}

int main() {
	//cin.tie(0)->sync_with_stdio(0);
	//cin.exceptions(cin.failbit);

  mem[A] = 100, mem[B] = 1000;

  // allocations
  rep(i, 0, 11) C[i] = alloc();
  rep(i, 0, 64) P2[i] = alloc();

  // generate constants
  {
    // Generate C[1]
    int t = alloc();
    add(t, A, B);
    cmp(C[1], C[0], t);
    bassert(mem[C[1]], int(0 < (mem[A] + mem[B])));
  }
  rep(i, 2, 11) {
    add(C[i], C[i - 1], C[1]);
    bassert(mem[C[i]], i);
  }

  add(P2[0], P2[0], C[1]);
  rep(i, 1, 64) {
    add(P2[i], P2[i - 1], P2[i - 1]);
    bassert(mem[P2[i]], 1ull << i);
  }

  // calculation
  {
    int ap1 = alloc(), acc = alloc(), bin = alloc(), tmp = alloc();
    add(ap1, A, C[1]);
    bassert(mem[ap1], mem[A] + 1);

    for(int d = 29; d >= 0; d--) {
      debug("\n=== d = %d\n", d);

      add(tmp, bin, P2[d]);
      debug("bin [%llu] + 2^%d [%llu] = %llu\n", mem[bin], d, mem[P2[d]], mem[tmp]);

      ull o_tmp = mem[tmp];
      cmp(tmp, tmp, ap1);
      debug("tmp [%llu] < ap1 [%llu] : %llu\n", o_tmp, mem[ap1], mem[tmp]);
      
      int av = alloc();
      if0(av, tmp, B);
      debug("av = %llu\n", mem[av]);

      rep(i, 0, d) add(tmp, tmp, tmp);
      rep(i, 0, d) add(av, av, av);

      add(acc, acc, av);
      add(bin, bin, tmp);

      debug("new av = %llu, new tmp = %llu\n", mem[av], mem[tmp]);
      debug("new acc = %llu, new bin = %llu\n", mem[acc], mem[bin]);
    }

    mov(2, acc);
    bassert(mem[acc], mem[A] * mem[B]);
  }

  write(ops.size());
  for (string op : ops) write(op);
}



Measured memory_bytes: 4188