#include <algorithm>  
#include <iostream>  
#include <sstream>  
#include <string>  
#include <vector>  
#include <queue>  
#include <set>  
#include <map>  
#include <cstdio>  
#include <cstdlib>  
#include <cctype>  
#include <cmath>  
#include <cstring>
#include <list>  
#include <cassert>
#include <climits>
#include <bitset>
#include <chrono>
#include <random>
using namespace std;

#define PB push_back  
#define MP make_pair  
#define SZ(v) ((int)(v).size())  
#define FOR(i,a,b) for(int i=(a);i<(b);++i)  
#define REP(i,n) FOR(i,0,n)  
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)  
#define REPE(i,n) FORE(i,0,n)  
#define FORSZ(i,a,v) FOR(i,a,SZ(v))  
#define REPSZ(i,v) REP(i,SZ(v))  
std::mt19937 rnd((int)std::chrono::steady_clock::now().time_since_epoch().count());
typedef long long ll;
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }

const int MAXBIT = 29;
const int MAXVAL = 1000000000;
struct Op { char kind; int a, b, c; Op() {} Op(char kind, int a, int b, int c) :kind(kind), a(a), b(b), c(c) {} };

vector<Op> ans;


int A, B, C;
int nxt;
int zero, sum;
int p2[MAXBIT + 1];
int p2min1[MAXBIT + 1];
int a[MAXBIT + 1];
int b[MAXBIT + 1];



void solve() {
	ans.clear();
	nxt = 0;
	A = nxt++, B = nxt++, C = nxt++;
	
	int zero = nxt++;
	int sum = nxt++;
	ans.PB(Op('+', A, B, sum));

	REPE(i, MAXBIT) p2[i] = nxt++;
	ans.PB(Op('<', zero, sum, p2[0]));
	REP(i, MAXBIT) ans.PB(Op('+', p2[i], p2[i], p2[i + 1]));

	REPE(i, MAXBIT) p2min1[i] = nxt++;
	REP(i, MAXBIT) ans.PB(Op('+', p2min1[i], p2[i], p2min1[i + 1]));

	int tmp = nxt++, tmp2 = nxt++, tmp3 = nxt++;
	REPE(i, MAXBIT) a[i] = nxt++;
	REPE(i, MAXBIT) b[i] = nxt++;
	for (int i = MAXBIT; i >= 0; --i) {
		ans.PB(Op('+', tmp, p2min1[i], tmp3));
		ans.PB(Op('<', tmp3, A, a[i]));
		ans.PB(Op('+', zero, a[i], tmp2));
		REP(j, i) ans.PB(Op('+', tmp2, tmp2, tmp2));
		ans.PB(Op('+', tmp, tmp2, tmp));
	}
	ans.PB(Op('+', zero, zero, tmp));
	for (int i = MAXBIT; i >= 0; --i) {
		ans.PB(Op('+', tmp, p2min1[i], tmp3));
		ans.PB(Op('<', tmp3, B, b[i]));
		ans.PB(Op('+', zero, b[i], tmp2));
		REP(j, i) ans.PB(Op('+', tmp2, tmp2, tmp2));
		ans.PB(Op('+', tmp, tmp2, tmp));
	}

	REPE(i, MAXBIT) REPE(j, MAXBIT) {
		ans.PB(Op('+', a[i], b[j], tmp));
		ans.PB(Op('<', p2[0], tmp, tmp));
		REP(k, i + j) ans.PB(Op('+', tmp, tmp, tmp));
		ans.PB(Op('+', C, tmp, C));
	}
}

void run() {
	solve();
	printf("%d\n", SZ(ans));
	REPSZ(i, ans) printf("%c %d %d %d\n", ans[i].kind, ans[i].a, ans[i].b, ans[i].c);
}

void stress() {
	solve();
	int mxid = 2; REPSZ(i, ans) mxid = max(mxid, max(max(ans[i].a, ans[i].b), ans[i].c));
	REP(rep,100000) {
		A = rnd() % (MAXVAL + 1), B = rnd() % (MAXVAL + 1);
		//if (A != 3 || B != 5) continue;
		vector<ll> val(mxid + 1, 0); val[0] = A, val[1] = B;
		REPSZ(i, ans) {
			char kind = ans[i].kind; int a = ans[i].a, b = ans[i].b, c = ans[i].c;
			if (kind == '+') {
				val[c] = val[a] + val[b];
			} else if(kind=='<') {
				val[c] = val[a] < val[b] ? 1 : 0;
			} else {
				assert(false);
			}
			//printf("%c %d %d %d\n", ans[i].kind, ans[i].a, ans[i].b, ans[i].c);
			//printf("val:"); REPE(j, mxid) printf(" %lld", val[j]); puts("");
		}
		ll have = val[2], want = (ll)A * B;
		if (have == want) { printf("."); continue; }
		printf("%d*%d: have=%lld want=%lld\n", A, B, have, want);
	}
}

int main() {
	run();
	//stress();
	return 0;
}


Measured memory_bytes: 3796