#if 1
#ifdef LOCAL
#define _GLIBCXX_DEBUG 1
#define dbg(...) cerr << "LINE(" << __LINE__ << ") -> [" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)
#else
#define dbg(...) 0
#endif

#include <bits/stdc++.h>
using namespace std;

#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define sz(x) (int)(x).size()
#define all(x) begin(x), end(x)
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)

typedef string str;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

#define ts to_string
str ts(char c) { return str(1,c); }
str ts(bool b) { return b ? "true" : "false"; }
str ts(const char* s) { return (str)s; }
str ts(str s) { return s; }
template<class A> str ts(complex<A> c) { stringstream ss; ss << c; return ss.str(); }
str ts(vector<bool> v) { str res = "{"; F0R(i,sz(v)) res += char('0'+v[i]);	res += "}"; return res; }
template<size_t SZ> str ts(bitset<SZ> b) { str res = ""; F0R(i,SZ) res += char('0'+b[i]); return res; }
template<class A, class B> str ts(pair<A,B> p);
template<class T> str ts(T v) { bool fst = 1; str res = "{"; for (const auto& x: v) {if (!fst) res += ", ";	fst = 0; res += ts(x);}	res += "}"; return res;}
template<class A, class B> str ts(pair<A,B> p) {return "("+ts(p.f)+", "+ts(p.s)+")"; }
 
template<class A> void pr(A x) { cout << ts(x); }
template<class H, class... T> void pr(const H& h, const T&... t) { pr(h); pr(t...); }
void ps() { pr("\n"); }
template<class H, class... T> void ps(const H& h, const T&... t) { pr(h); if (sizeof...(t)) pr(" "); ps(t...); }
 
void DBG() { cerr << "]" << endl; }
template<class H, class... T> void DBG(H h, T... t) {cerr << ts(h); if (sizeof...(t)) cerr << ", ";	DBG(t...); }
#endif

int unused = 1000;
int zero = 199999;
int one = 3;

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

void compare(int dest, int i, int j) {
    ops.push_back({'<', {i, {j,dest}}});
    // cout << "< " << dest << ' ' << i << ' ' << j << '\n';
}

void add(int dest, int i, int j) {
    ops.push_back({'+', {i, {j,dest}}});
    // cout << "+ " << dest << ' ' << i << ' ' << j << '\n';
}

void do_the_and(int dest, int i, int j) {
    int temp1 = unused++;
    int temp2 = unused++;
    compare(temp1, i, one);
    compare(temp2, j, one);
    add(temp2, temp1, temp2);
    compare(dest, temp2, one);
}

int pow2(int v) {
    return 3+v;
}

void convert(int src, int start) {
    int curval = unused++;
    
    for (int p = 30; p >= 0; p--) {
        int dest = start + p;

        int temp1 = unused++;
        int temp2 = unused++;
        add(temp1, curval, pow2(p));
        compare(dest, temp1, src);

        add(temp2, dest, zero);
        for (int j = 0; j < p; j++) {
            add(temp2,temp2,temp2);
        }
        add(curval,curval,temp2);
    }
}


int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    compare(3, 3, 0);
    for (int i = 4; i < 35; i++) {
        add(i, i-1, i-1);
    }


    add(0, 0, one);
    add(1, 1, one);


    convert(0, 100000);
    convert(1, 110000);

    for (int fin = 60; fin >= 0; fin--) {
        add(2, 2, 2);
        for (int p1 = 30; p1 >= 0; p1--) {
            for (int p2 = 30; p2 >= 0; p2--) if (p1+p2 == fin) {
                int idx1 = 100000 + p1;
                int idx2 = 110000 + p2;

                int nloc = unused++;
                do_the_and(nloc, idx1, idx2);
                add(2, 2, nloc);
            }
        }
    }

    // cout << unused << endl;
    cout << sz(ops) << '\n';
    for (int i = 0; i < sz(ops); i++) {
        cout << ops[i].first << ' ' << ops[i].second.first << ' ' << ops[i].second.second.first << ' ' << ops[i].second.second.second << '\n';
    }

    return 0;
}

Measured memory_bytes: 3740