//~ while (clock()<=69*CLOCKS_PER_SEC)
//~ #pragma comment(linker, "/stack:200000000")
#ifndef LOCAL
#pragma GCC optimize("O3")
#endif
//~ #pragma GCC optimize("Ofast")
//~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//~ #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define st first
#define nd second

using namespace __gnu_pbds;
using namespace std;
 
template <typename T>
using ordered_set =
	tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
 
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
 
#define shandom_ruffle random_shuffle
 
using ll=long long;
using ull=unsigned long long;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using vi=vector<int>;
using vll=vector<ll>;

vector<tuple<char, int, int, int>> ops;

int Simulate(int A, int B, int addr = 2) {
	vector<ull> memory(200 * 1000);
	memory[0] = A;
	memory[1] = B;
	for (auto &&[type, i, j, k] : ops) {
		if (type == '+') {
			memory[k] = memory[i] + memory[j];
		} else {
			memory[k] = memory[i] < memory[j];
		}
	}
	return memory[addr];
}

void Output() {
	cout << SZ(ops) << "\n";
	for (auto &&[type, i, j, k] : ops) {
		cout << type << " " << i << " " << j << " " << k << "\n";
	}
}

void Add(int i, int j, int dest) {
	ops.emplace_back('+', i, j, dest);
}

void Cmp(int i, int j, int dest) {
	ops.emplace_back('<', i, j, dest);
}

#warning make larger
const int K = 30;
vector<int> powers;

int num_addrs = 3;
int loczero, locone, locsum;

int GetAddr() {
	return num_addrs++;
}

void MulPower(int addr, int pwr) {
	for (int i = 0; i < pwr; ++i) {
		Add(addr, addr, addr);
	}
}

vi MakeBinary(int addr_plus1) {
	int cur_num = GetAddr();
	debug() << imie(powers);
	debug() << imie(cur_num);
	vi res;
	for (int bit = K - 1; bit >= 0; --bit) {
		res.push_back(GetAddr());
		const int res_addr = res.back();
		const int chk = GetAddr();
		Add(cur_num, powers[bit], chk);
		Cmp(chk, addr_plus1, res_addr);

		const int cpy = GetAddr();
		Add(res_addr, loczero, cpy);
		MulPower(cpy, bit);
		Add(cur_num, cpy, cur_num);

		debug() << imie(bit) << imie(res_addr) << imie(chk) << imie(cpy);
	}
	reverse(ALL(res));

	return res;
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout << fixed << setprecision(11);
	cerr << fixed << setprecision(6);

	// make one
	loczero = GetAddr();
	locone = GetAddr();
	locsum = GetAddr();
	Add(0, 1, locsum);
	Cmp(loczero, locsum, locone);

	// make powers
	powers.push_back(locone);
	while (SZ(powers) < K) {
		const int loc = GetAddr();
		Add(powers.back(), powers.back(), loc);
		powers.push_back(loc);
	}

	const int ap1 = GetAddr();
	debug() << imie(ap1);
	const int bp1 = GetAddr();
	Add(0, locone, ap1);
	Add(1, locone, bp1);
	vi bin_a = MakeBinary(ap1);
	vi bin_b = MakeBinary(bp1);

	for (int i = 0; i < K; ++i) {
		for (int j = 0; j < K; ++j) {
			const int sum_addr = GetAddr();
			Add(bin_a[i], bin_b[j], sum_addr);
			const int cmp_addr = GetAddr();
			Cmp(locone, sum_addr, cmp_addr);
			MulPower(cmp_addr, i + j);
			Add(cmp_addr, 2, 2);
		}
	}

	Output();

	//~ for (int i = 0; i < K; ++i) {
		//~ const int b = bin_a[i];
		//~ cout << Simulate(6, 7, b);
	//~ }
	//~ cout << "\n";
	//~ for (int i = 0; i < K; ++i) {
		//~ const int b = bin_b[i];
		//~ cout << Simulate(6, 7, b);
	//~ }
	//~ cout << "\n";
	//~ cout << Simulate(5, 7, 2) << "\n";
}


Measured memory_bytes: 3832